public class

HttpResponseParser

extends AbstractMessageParser
java.lang.Object
   ↳ org.apache.http.impl.io.AbstractMessageParser
     ↳ org.apache.http.impl.io.HttpResponseParser

Class Overview

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:

Summary

[Expand]
Inherited Fields
From class org.apache.http.impl.io.AbstractMessageParser
Public Constructors
HttpResponseParser(SessionInputBuffer buffer, LineParser parser, HttpResponseFactory responseFactory, HttpParams params)
Creates an instance of this class.
Protected Methods
HttpMessage parseHead(SessionInputBuffer sessionBuffer)
Subclasses must override this method to generate an instance of HttpMessage based on the initial input from the session buffer.
[Expand]
Inherited Methods
From class org.apache.http.impl.io.AbstractMessageParser
From class java.lang.Object
From interface org.apache.http.io.HttpMessageParser

Public Constructors

public HttpResponseParser (SessionInputBuffer buffer, LineParser parser, HttpResponseFactory responseFactory, HttpParams params)

Creates an instance of this class.

Parameters
buffer the session input buffer.
parser the line parser.
responseFactory the factory to use to create HttpResponses.
params HTTP parameters.

Protected Methods

protected HttpMessage parseHead (SessionInputBuffer sessionBuffer)

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 the session input buffer.
Returns
  • HTTP message based on the input from the session buffer.