Package org.apache.hc.core5.http.message
Interface LineParser
- All Known Implementing Classes:
BasicLineParser
,LazyLaxLineParser
,LazyLineParser
public interface LineParser
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 TypeMethodDescriptionparseHeader
(CharArrayBuffer buffer) Parses a header from the given buffer containing one line of text.parseRequestLine
(CharArrayBuffer buffer) Parses a request line from the given buffer containing one line of text.parseStatusLine
(CharArrayBuffer buffer) Parses a status line from the given buffer containing one line of text.
-
Method Details
-
parseRequestLine
Parses a request line from the given buffer containing one line of text.- Parameters:
buffer
- a buffer holding a line to parse- Returns:
- the parsed request line
- Throws:
ParseException
- in case of a parse error
-
parseStatusLine
Parses a status line from the given buffer containing one line of text.- Parameters:
buffer
- a buffer holding a line to parse- Returns:
- the parsed status line
- Throws:
ParseException
- in case of a parse error
-
parseHeader
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
- a buffer holding the full header line.- Returns:
- the header in the argument buffer.
- Throws:
ParseException
- in case of a parse error
-