Top Description Fields Constructors Methods
org.apache.http.impl.conn

public Class DefaultResponseParser

extends AbstractMessageParser<HttpMessage>
Class Inheritance
Annotations
@Deprecated
@Contract
threading:SAFE_CONDITIONAL
Imports
java.io.IOException, org.apache.commons.logging.Log, .LogFactory, org.apache.http.HttpException, .HttpMessage, .HttpResponseFactory, .NoHttpResponseException, .ProtocolException, .StatusLine, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.impl.io.AbstractMessageParser, org.apache.http.io.SessionInputBuffer, org.apache.http.message.LineParser, .ParserCursor, org.apache.http.params.HttpParams, org.apache.http.util.Args, .CharArrayBuffer

Deprecated

(4.2) use DefaultHttpResponseParser

Default HTTP response parser implementation.

The following parameters can be used to customize the behavior of this class:

Since
4.0

Field Summary

Modifier and TypeField and Description
private final CharArrayBuffer
private final Log
private final int
private final HttpResponseFactory
Inherited from org.apache.http.impl.io.AbstractMessageParser:
lineParser

Constructor Summary

AccessConstructor and Description
public
DefaultResponseParser(final SessionInputBuffer buffer, final LineParser parser, final HttpResponseFactory responseFactory, final HttpParams params)

Deprecated as a consequence of HttpParams being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected int
getMaxGarbageLines(final HttpParams params)

Deprecated as a consequence of HttpParams being deprecated.
protected HttpMessage
parseHead(final SessionInputBuffer
the session input buffer.
sessionBuffer
)

Implements abstract org.apache.http.impl.io.AbstractMessageParser.parseHead.

Subclasses must override this method to generate an instance of HttpMessage based on the initial input from the session buffer.
Inherited from org.apache.http.impl.io.AbstractMessageParser:
parseparseHeadersparseHeaders

Field Detail

lineBufback to summary
private final CharArrayBuffer lineBuf
logback to summary
private final Log log
maxGarbageLinesback to summary
private final int maxGarbageLines
responseFactoryback to summary
private final HttpResponseFactory responseFactory

Constructor Detail

DefaultResponseParserback to summary
public DefaultResponseParser(final SessionInputBuffer buffer, final LineParser parser, final HttpResponseFactory responseFactory, final HttpParams params)

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Method Detail

getMaxGarbageLinesback to summary
protected int getMaxGarbageLines(final HttpParams params)

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

parseHeadback to summary
protected HttpMessage parseHead(final SessionInputBuffer sessionBuffer) throws IOException, HttpException

Implements abstract org.apache.http.impl.io.AbstractMessageParser.parseHead.

Doc from org.apache.http.impl.io.AbstractMessageParser.parseHead.

Subclasses must override this method to generate an instance of HttpMessage based on the initial input from the session buffer.

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 HttpMessage.

Parameters
sessionBuffer:SessionInputBuffer

the session input buffer.

Returns:HttpMessage

HTTP message based on the input from the session buffer.

Annotations
@Override
Exceptions
IOException:
in case of an I/O error.
HttpException:
in case of HTTP protocol violation.