SessionInputBuffer.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final List | |
| private static final int | |
| protected final LineParser | |
| private T | |
| private final MessageConstraints | |
| private final SessionInputBuffer | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | AbstractMessageParser(final SessionInputBuffer
the session input buffer. buffer, final LineParser the line parser. parser, final HttpParams HTTP parameters. params)
Creates an instance of AbstractMessageParser.
|
| public | AbstractMessageParser(final SessionInputBuffer
the session input buffer. buffer, final LineParser the line parser. If lineParser, final MessageConstraints null BasicLineParser#INSTANCE
will be used.the message constraints. If constraints)null
MessageConstraints#DEFAULT will be used.Creates new instance of AbstractMessageParser. |
| Modifier and Type | Method and Description |
|---|---|
| public T | parse()
Implements org. HttpMessage from the underlying data
source.
|
| protected abstract T | Returns: HTTP message based on the input from the session buffer.the session input buffer. sessionBuffer)Subclasses must override this method to generate an instance of
|
| public static Header[] | Returns: array of HTTP headersSession input buffer inBuffer, 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. Can be parser)null, in which case
the default implementation of this interface will be used.Parses HTTP headers from the data receiver stream according to the generic format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3. |
| public static Header[] | Returns: array of HTTP headersSession input buffer inBuffer, 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 given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3. |
| 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 | |
| lineParser | back to summary |
|---|---|
| protected final LineParser lineParser | |
| message | back to summary |
|---|---|
| private T message | |
| messageConstraints | back to summary |
|---|---|
| private final MessageConstraints messageConstraints | |
| sessionBuffer | back to summary |
|---|---|
| private final SessionInputBuffer sessionBuffer | |
| state | back to summary |
|---|---|
| private int state | |
| AbstractMessageParser | back to summary |
|---|---|
| public AbstractMessageParser(final SessionInputBuffer buffer, final LineParser parser, final HttpParams params)
Deprecated (4.3) use Creates an instance of AbstractMessageParser.
| |
| AbstractMessageParser | back to summary |
|---|---|
| public AbstractMessageParser(final SessionInputBuffer buffer, final LineParser lineParser, final MessageConstraints constraints) Creates new instance of AbstractMessageParser.
| |
| parse | back to summary |
|---|---|
| public T parse() throws IOException, HttpException Implements org. Doc from org. Generates an instance of
| |
| parseHead | back to summary |
|---|---|
| protected abstract T parseHead(SessionInputBuffer sessionBuffer) throws IOException, HttpException, ParseException 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
| |
| parseHeaders | back to summary |
|---|---|
| public static Header[] parseHeaders(final SessionInputBuffer inBuffer, final int maxHeaderCount, final int maxLineLen, final LineParser parser) throws HttpException, IOException Parses HTTP headers from the data receiver stream according to the generic format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
| |
| parseHeaders | back to summary |
|---|---|
| public static Header[] parseHeaders(final SessionInputBuffer inBuffer, 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 given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
| |