How can I read a binary file from a socket input stream which includes textual headers?
Read binary data from a socket
Java Network Programming, 2nd Edition
How do I recognize EOF in Java Sockets?
Creating a simple java web server
BufferedReader in =new BufferedReader(
new InputStreamReader( Connection.getInputStream() ) );
String s=null;
while ( (s=in.readLine()) != null) {
//Read HTTP header
if (s.isEmpty()) break;//No more headers
}
}