org.apache.http.impl.nio.codecs
Class DefaultHttpResponseParser

java.lang.Object
  extended by org.apache.http.impl.nio.codecs.AbstractMessageParser<HttpResponse>
      extended by org.apache.http.impl.nio.codecs.DefaultHttpResponseParser
All Implemented Interfaces:
NHttpMessageParser<HttpResponse>

@NotThreadSafe
public class DefaultHttpResponseParser
extends AbstractMessageParser<HttpResponse>

Default NHttpMessageParser implementation for HttpResponses.

Since:
4.1

Field Summary
 
Fields inherited from class org.apache.http.impl.nio.codecs.AbstractMessageParser
lineParser
 
Constructor Summary
DefaultHttpResponseParser(SessionInputBuffer buffer)
           
DefaultHttpResponseParser(SessionInputBuffer buffer, LineParser parser, HttpResponseFactory responseFactory, HttpParams params)
          Deprecated. (4.3) use DefaultHttpResponseParser( SessionInputBuffer, LineParser, HttpResponseFactory, MessageConstraints)
DefaultHttpResponseParser(SessionInputBuffer buffer, LineParser parser, HttpResponseFactory responseFactory, MessageConstraints constraints)
          Creates an instance of DefaultHttpResponseParser.
DefaultHttpResponseParser(SessionInputBuffer buffer, MessageConstraints constraints)
           
 
Method Summary
protected  HttpResponse createMessage(CharArrayBuffer buffer)
          Creates HttpMessage instance based on the content of the input buffer containing the first line of the incoming HTTP message.
 
Methods inherited from class org.apache.http.impl.nio.codecs.AbstractMessageParser
fillBuffer, parse, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpResponseParser

@Deprecated
public DefaultHttpResponseParser(SessionInputBuffer buffer,
                                            LineParser parser,
                                            HttpResponseFactory responseFactory,
                                            HttpParams params)
Deprecated. (4.3) use DefaultHttpResponseParser( SessionInputBuffer, LineParser, HttpResponseFactory, MessageConstraints)


DefaultHttpResponseParser

public DefaultHttpResponseParser(SessionInputBuffer buffer,
                                 LineParser parser,
                                 HttpResponseFactory responseFactory,
                                 MessageConstraints constraints)
Creates an instance of DefaultHttpResponseParser.

Parameters:
buffer - the session input buffer.
parser - the line parser. If null BasicLineParser.INSTANCE will be used.
responseFactory - the response factory. If null DefaultHttpResponseFactory.INSTANCE will be used.
constraints - Message constraints. If null MessageConstraints.DEFAULT will be used.
Since:
4.3

DefaultHttpResponseParser

public DefaultHttpResponseParser(SessionInputBuffer buffer,
                                 MessageConstraints constraints)
Since:
4.3

DefaultHttpResponseParser

public DefaultHttpResponseParser(SessionInputBuffer buffer)
Since:
4.3
Method Detail

createMessage

protected HttpResponse createMessage(CharArrayBuffer buffer)
                              throws HttpException,
                                     ParseException
Description copied from class: AbstractMessageParser
Creates HttpMessage instance based on the content of the input buffer containing the first line of the incoming HTTP message.

Specified by:
createMessage in class AbstractMessageParser<HttpResponse>
Parameters:
buffer - the line buffer.
Returns:
HTTP message.
Throws:
HttpException - in case of HTTP protocol violation
ParseException - in case of a parse error.


Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.