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

public Class LazyLaxLineParser

extends BasicLineParser
Class Inheritance
Imports
org.apache.hc.core5.http.Header, .ParseException, org.apache.hc.core5.util.Args, .CharArrayBuffer

Extension of org.apache.hc.core5.http.message.BasicLineParser that defers parsing of header values. Header value is parsed only if accessed with org.apache.hc.core5.http.Header#getValue().

This parser unlike BasicLineParser and LazyLineParser 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

Modifier and TypeField and Description
public static final LazyLaxLineParser

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Header
parseHeader(final CharArrayBuffer
a buffer holding the full header line.
buffer
)

Overrides org.apache.hc.core5.http.message.BasicLineParser.parseHeader.

Implements org.apache.hc.core5.http.message.LineParser.parseHeader.

Parses a header from the given buffer containing one line of text.
Inherited from org.apache.hc.core5.http.message.BasicLineParser:
parseProtocolVersionparseRequestLineparseStatusLine

Field Detail

INSTANCEback to summary
public static final LazyLaxLineParser INSTANCE

Hides org.apache.hc.core5.http.message.BasicLineParser.INSTANCE.

Constructor Detail

LazyLaxLineParserback to summary
public LazyLaxLineParser()

Method Detail

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

Overrides org.apache.hc.core5.http.message.BasicLineParser.parseHeader.

Implements org.apache.hc.core5.http.message.LineParser.parseHeader.

Doc from org.apache.hc.core5.http.message.LineParser.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:CharArrayBuffer

a buffer holding the full header line.

Returns:Header

the header in the argument buffer.

Annotations
@Override
Exceptions
ParseException:
in case of a parse error