public void readFrom ( InputStream in , byte [ ] buffer ) throws IOException { String header ; while ( ( header = HttpUtils . readLine ( in , buffer , MAX_HEADER_LENGTH ) ) != null ) { if ( header . length ( ) == 0 ) { break ; } processHeaderLine ( header ) ; } }
Read and parse headers from the given InputStream until a blank line is reached . Except for Cookies all other headers that contain multiple fields delimited by commas are parsed into multiple headers .