org.apache.hc.core5.http.io.SessionInputBuffer .
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final List | |
| private static final int | |
| private final CharArrayBuffer | |
| private final Http1Config | |
| private final LineParser | |
| private T | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | AbstractMessageParser(final LineParser
the line parser. If lineParser, final Http1Config null
org. will be used.the message http1Config. If http1Config)null
Http1Config#DEFAULT will be used.Creates new instance of AbstractMessageParser. |
| Modifier and Type | Method and Description |
|---|---|
| protected IOException | createConnectionClosedException()
Deprecated
do not use.
Subclasses must override this method to generate an appropriate exception
in case of unexpected connection termination by the peer endpoint.
|
| protected abstract T | Returns: HTTP message based on the input from the session buffer.the session input buffer. buffer)Subclasses must override this method to generate an instance of
|
| pack-priv LineParser | |
| public T | parse(final SessionInputBuffer
Session input buffer buffer, final InputStream Input stream inputStream)Implements org. MessageHeaders from the given input stream..
|
| public static Header[] | Returns: array of HTTP headersSession input buffer inBuffer, final InputStream Input stream inputStream, final int maximum number of headers allowed. If the number
of headers received from the data stream exceeds maxCount value, an
IOException will be thrown. Setting this parameter to a negative value
or zero will disable the check. maxHeaderCount, final int maximum number of characters for a header line,
including the continuation lines. Setting this parameter to a negative
value or zero will disable the check. maxLineLen, final LineParser the line parser. If lineParser)null
org. will be usedParses HTTP headers from the data receiver stream according to the generic format as specified by the HTTP/1.1 protocol specification. |
| public static Header[] | Returns: array of HTTP headersSession input buffer inBuffer, final InputStream Input stream inputStream, final int maximum number of headers allowed. If the number
of headers received from the data stream exceeds maxCount value, an
IOException will be thrown. Setting this parameter to a negative value
or zero will disable the check. maxHeaderCount, final int maximum number of characters for a header line,
including the continuation lines. Setting this parameter to a negative
value or zero will disable the check. maxLineLen, final LineParser line parser to use. parser, final List<CharArrayBuffer> List of header lines. This list will be used to store
intermediate results. This makes it possible to resume parsing of
headers in case of a headerLines)java..Parses HTTP headers from the data receiver stream according to the generic format as specified by the HTTP/1.1 protocol specification. |
| HEAD_LINE | back to summary |
|---|---|
| private static final int HEAD_LINE | |
| headerLines | back to summary |
|---|---|
| private final List<CharArrayBuffer> headerLines | |
| HEADERS | back to summary |
|---|---|
| private static final int HEADERS | |
| headLine | back to summary |
|---|---|
| private final CharArrayBuffer headLine | |
| http1Config | back to summary |
|---|---|
| private final Http1Config http1Config | |
| lineParser | back to summary |
|---|---|
| private final LineParser lineParser | |
| message | back to summary |
|---|---|
| private T message | |
| state | back to summary |
|---|---|
| private int state | |
| AbstractMessageParser | back to summary |
|---|---|
| public AbstractMessageParser(final LineParser lineParser, final Http1Config http1Config) Creates new instance of AbstractMessageParser.
| |
| createConnectionClosedException | back to summary |
|---|---|
| protected IOException createConnectionClosedException()
Deprecated do not use. Subclasses must override this method to generate an appropriate exception in case of unexpected connection termination by the peer endpoint.
| |
| createMessage | back to summary |
|---|---|
| protected abstract T createMessage(CharArrayBuffer buffer) throws IOException, HttpException Subclasses must override this method to generate an instance of
Usually this method is expected to read just the very first line or
the very first valid from the data stream and based on the input generate
an appropriate instance of
| |
| getLineParser | back to summary |
|---|---|
| pack-priv LineParser getLineParser() | |
| parse | back to summary |
|---|---|
| public T parse(final SessionInputBuffer buffer, final InputStream inputStream) throws IOException, HttpException Implements org. Doc from org. Generates an instance of
| |
| parseHeaders | back to summary |
|---|---|
| public static Header[] parseHeaders(final SessionInputBuffer inBuffer, final InputStream inputStream, final int maxHeaderCount, final int maxLineLen, final LineParser lineParser) throws HttpException, IOException Parses HTTP headers from the data receiver stream according to the generic format as specified by the HTTP/1.1 protocol specification.
| |
| parseHeaders | back to summary |
|---|---|
| public static Header[] parseHeaders(final SessionInputBuffer inBuffer, final InputStream inputStream, final int maxHeaderCount, final int maxLineLen, final LineParser parser, final List<CharArrayBuffer> headerLines) throws HttpException, IOException Parses HTTP headers from the data receiver stream according to the generic format as specified by the HTTP/1.1 protocol specification.
| |