Parses an HTTP message from the given FileDescriptor.

By: Stéphane Épardaud
  • Parser
    • Basic
      • Identifiable
      • Object
        • Anything

no subtypes hierarchy

Initializer
Parser(FileDescriptor socket)
Attributes
headersSource Codeshared LinkedList<Header> headers

List of headers parsed.

headersByNameSource Codeshared MutableMap<String,Header> headersByName

Map of headers parsed, by name.

Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
parseChunkHeaderSource Codeshared Integer parseChunkHeader(Boolean firstChunk)

Parses a chunk header, starting with a CRLF if firstChunk is false. Returns the next chunk's size.

Throws
  • Exception

    If the chunk header could not be parsed.

parseChunkTrailerSource Codeshared void parseChunkTrailer()

Parses a chunk trailer: optional headers.

Throws
  • Exception

    If an invalid header is present.

parseHeadersSource Codeshared void parseHeaders()

Parses a list of headers until a CRLF CRLF sequence

Throws
  • Exception

    On invalid headers or EOF

parseResponseSource Codeshared Response parseResponse()

Parses an HTTP Response until the end of headers.

Throws
  • Exception

    On an invalid HTTP Response or EOF

Inherited Methods
Methods inherited from: Object
equals