Quadcap Embeddable Server

com.quadcap.http.util.HeaderParser Class Reference

List of all members.

Detailed Description

An HTTP header parser.

Author:
Stan Bailes

Definition at line 57 of file HeaderParser.java.

Static Public Member Functions

String getToken (Scanner scanner, OctetMap map) throws IOException
 Parsing helper: Get the next bytes all of which are in the specified map.

void parseHeaders (Scanner scanner, Map headers) throws IOException
 Parse the HTTP headers in this input source.

void parseCRLF (Scanner scanner) throws IOException
 Skip trailing whitespace followed by CRLF.

Map parseHeaders (InputStream is) throws IOException
 Utility method to parse HTTP headers from an input stream, leaving the stream posisitioned after the blank line following the headers.


Member Function Documentation

String com.quadcap.http.util.HeaderParser.getToken Scanner  scanner,
OctetMap  map
throws IOException [static]
 

Parsing helper: Get the next bytes all of which are in the specified map.

Parameters:
scanner the current scanner input source
map the octet map specifying the bytes we want

Definition at line 66 of file HeaderParser.java.

References com.quadcap.http.util.HeaderParser.getToken().

Referenced by com.quadcap.http.util.HeaderParser.getToken().

void com.quadcap.http.util.HeaderParser.parseCRLF Scanner  scanner  )  throws IOException [static]
 

Skip trailing whitespace followed by CRLF.

Parameters:
scanner the current scanner input source
Exceptions:
IOException if anything other than CRLF is found

Definition at line 125 of file HeaderParser.java.

References com.quadcap.http.util.HeaderParser.parseCRLF().

Referenced by com.quadcap.http.util.HeaderParser.parseCRLF(), and com.quadcap.http.util.HeaderParser.parseHeaders().

Map com.quadcap.http.util.HeaderParser.parseHeaders InputStream  is  )  throws IOException [static]
 

Utility method to parse HTTP headers from an input stream, leaving the stream posisitioned after the blank line following the headers.

Definition at line 139 of file HeaderParser.java.

void com.quadcap.http.util.HeaderParser.parseHeaders Scanner  scanner,
Map  headers
throws IOException [static]
 

Parse the HTTP headers in this input source.

Exceptions:
IOException may be thrown

Definition at line 78 of file HeaderParser.java.

References com.quadcap.http.util.HeaderParser.parseCRLF(), and com.quadcap.http.util.HeaderParser.parseHeaders().

Referenced by com.quadcap.http.util.HeaderParser.parseHeaders().