For writing to Java Socket, it is necessary to get the OutputStream. This is done as following:
This is so simple!
Socket socket = new Socket("jenkov.com", 80);
OutputStream out = socket.getOutputStream();
Flush() shall be called when one desires the data which has been sent across web to server. TCP/IP