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

public Class LazyLineParser

extends BasicLineParser
Class Inheritance
Annotations
@Contract
threading:IMMUTABLE
Imports
org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, 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 should be used to parse request messages on the server server.

Since
5.0

Field Summary

Modifier and TypeField and Description
public static final LazyLineParser

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 LazyLineParser INSTANCE

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

Constructor Detail

LazyLineParserback to summary
public LazyLineParser()

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