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

public Class HttpResponseParser

extends AbstractMessageParser<HttpMessage>
Class Inheritance
Annotations
@Deprecated
Imports
java.io.IOException, org.apache.http.HttpException, .HttpMessage, .HttpResponseFactory, .NoHttpResponseException, .ParseException, .StatusLine, 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

HTTP response parser that obtain its input from an instance of SessionInputBuffer.

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 HttpResponseFactory
Inherited from org.apache.http.impl.io.AbstractMessageParser:
lineParser

Constructor Summary

AccessConstructor and Description
public
HttpResponseParser(final SessionInputBuffer
the session input buffer.
buffer
,
final LineParser
the line parser.
parser
,
final HttpResponseFactory
the factory to use to create org.apache.http.HttpResponses.
responseFactory
,
final HttpParams
HTTP parameters.
params
)

Deprecated as a consequence of HttpParams being deprecated.
Creates an instance of this class.

Method Summary

Modifier and TypeMethod and Description
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
responseFactoryback to summary
private final HttpResponseFactory responseFactory

Constructor Detail

HttpResponseParserback to summary
public HttpResponseParser(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.

Creates an instance of this class.

Parameters
buffer:SessionInputBuffer

the session input buffer.

parser:LineParser

the line parser.

responseFactory:HttpResponseFactory

the factory to use to create org.apache.http.HttpResponses.

params:HttpParams

HTTP parameters.

Method Detail

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

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.
ParseException:
in case of a parse error.