- Read headers with
input.readLine(); - Skip 2 empty lines
"\r\n\r\n" - Read body while line.length() != 0.
So the format could look like:
Header1\r\n Header2\r\n Header3\r\n\r\n BODY BODY BODY... Another option is to use com.sun.net.httpserver.HttpServer