Just for laughs...
socket = new ServerSocket(2004, 10);
connection = socket.accept();
in = connection.getInputStream();
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
String line = null;
do {
line = br.readLine();
} while (!"done".equals(line));
With LOOPBACK, i.e. just running to localhost with local processes, on my machine, and with a suitably "stupid" client.
requestSocket = new Socket("localhost", 2004);
out = requestSocket.getOutputStream();
PrintWriter pw = new PrintWriter(out);
String line = "...1000 characters long...";
for (int i = 0; i < 2000000 - 1; i++) {
pw.println(line);
}
line = "done";
pw.println(line);
pw.flush();
You'll note that this send 2M "1000 char" lines. It's simply a crude throughput test.
On my machine, loopback, I get ~190MB/sec transfer rate. Bytes, not bits. 190,000 lines/sec.
My point is that the "unsophisticated" way using bone stock Java sockets is quite fast. This will saturate any common network connection (meaning the network will be slowing you down more than your I/O here will).
Likely "fast enough".
What kind of traffic are you expecting?