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

public Interface LineParser

Known Direct Implementers
org.apache.hc.core5.http.message.BasicLineParser
Imports
org.apache.hc.core5.http.Header, .ParseException, org.apache.hc.core5.util.CharArrayBuffer

Interface for parsing lines in the HEAD section of an HTTP message. There are individual methods for parsing a request line, a status line, or a header line. Instances of this interface are expected to be stateless and thread-safe.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Header

Returns:

the header in the argument buffer.
parseHeader
(CharArrayBuffer
a buffer holding the full header line.
buffer
)

Parses a header from the given buffer containing one line of text.

public RequestLine

Returns:

the parsed request line
parseRequestLine
(CharArrayBuffer
a buffer holding a line to parse
buffer
)

Parses a request line from the given buffer containing one line of text.

public StatusLine

Returns:

the parsed status line
parseStatusLine
(CharArrayBuffer
a buffer holding a line to parse
buffer
)

Parses a status line from the given buffer containing one line of text.

Method Detail

parseHeaderback to summary
public Header parseHeader(CharArrayBuffer buffer) throws ParseException

Parses a header from the given buffer containing one line of text. The full header line is expected here. Header continuation lines must be joined by the caller before invoking this method.

Parameters
buffer:CharArrayBuffer

a buffer holding the full header line.

Returns:Header

the header in the argument buffer.

Exceptions
ParseException:
in case of a parse error
parseRequestLineback to summary
public RequestLine parseRequestLine(CharArrayBuffer buffer) throws ParseException

Parses a request line from the given buffer containing one line of text.

Parameters
buffer:CharArrayBuffer

a buffer holding a line to parse

Returns:RequestLine

the parsed request line

Exceptions
ParseException:
in case of a parse error
parseStatusLineback to summary
public StatusLine parseStatusLine(CharArrayBuffer buffer) throws ParseException

Parses a status line from the given buffer containing one line of text.

Parameters
buffer:CharArrayBuffer

a buffer holding a line to parse

Returns:StatusLine

the parsed status line

Exceptions
ParseException:
in case of a parse error