Top Description Methods
org.apache.hc.core5.http.nio

public Interface NHttpMessageParser<T extends org.apache.hc.core5.http.MessageHeaders>

Known Direct Implementers
org.apache.hc.core5.http.impl.nio.AbstractMessageParser
Imports
java.io.IOException, org.apache.hc.core5.http.HttpException, .MessageHeaders

Message parser intended to build HTTP message head from a session input buffer..
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

HTTP message head, if available, null otherwise.
parse
(SessionInputBuffer
session input buffer.
buffer
,
boolean
end of stream flag
endOfStream
)

Attempts to parse a complete message head from the content of the internal buffer.

public void
reset()

Resets the parser.

Method Detail

parseback to summary
public T parse(SessionInputBuffer buffer, boolean endOfStream) throws IOException, HttpException

Attempts to parse a complete message head from the content of the internal buffer. If the message in the input buffer is incomplete this method will return null.

Parameters
buffer:SessionInputBuffer

session input buffer.

endOfStream:boolean

end of stream flag

Returns:T

HTTP message head, if available, null otherwise.

Exceptions
IOException:
in case of an I/O error.
HttpException:
in case the HTTP message is malformed or violates the HTTP protocol.
resetback to summary
public void reset()

Resets the parser. The parser will be ready to start parsing another HTTP message.