Package org.apache.hc.core5.http.message
Class LazyLaxLineParser
- java.lang.Object
-
- org.apache.hc.core5.http.message.BasicLineParser
-
- org.apache.hc.core5.http.message.LazyLaxLineParser
-
- All Implemented Interfaces:
LineParser
public class LazyLaxLineParser extends BasicLineParser
Extension ofBasicLineParser
that defers parsing of header values. Header value is parsed only if accessed withNameValuePair.getValue()
.This parser unlike
BasicLineParser
andLazyLineParser
will not reject headers containing whitespaces between the header field name and colon.This parser should be used to parse response messages on the client server or to parse both request and response messages by an intermediary (proxy).
- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description static LazyLaxLineParser
INSTANCE
-
Constructor Summary
Constructors Constructor Description LazyLaxLineParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Header
parseHeader(CharArrayBuffer buffer)
Parses a header from the given buffer containing one line of text.-
Methods inherited from class org.apache.hc.core5.http.message.BasicLineParser
parseProtocolVersion, parseRequestLine, parseStatusLine
-
-
-
-
Field Detail
-
INSTANCE
public static final LazyLaxLineParser INSTANCE
-
-
Method Detail
-
parseHeader
public Header parseHeader(CharArrayBuffer buffer) throws ParseException
Description copied from interface:LineParser
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.- Specified by:
parseHeader
in interfaceLineParser
- Overrides:
parseHeader
in classBasicLineParser
- Parameters:
buffer
- a buffer holding the full header line.- Returns:
- the header in the argument buffer.
- Throws:
ParseException
- in case of a parse error
-
-