org.apache.http.impl.conn
Class DefaultHttpResponseParser

java.lang.Object
  extended by org.apache.http.impl.io.AbstractMessageParser<HttpResponse>
      extended by org.apache.http.impl.conn.DefaultHttpResponseParser
All Implemented Interfaces:
HttpMessageParser<HttpResponse>

public class DefaultHttpResponseParser
extends AbstractMessageParser<HttpResponse>

Lenient HTTP response parser implementation that can skip malformed data until a valid HTTP response message head is encountered.

Since:
4.2

Field Summary
 
Fields inherited from class org.apache.http.impl.io.AbstractMessageParser
lineParser
 
Constructor Summary
DefaultHttpResponseParser(SessionInputBuffer buffer)
          Creates new instance of DefaultHttpResponseParser.
DefaultHttpResponseParser(SessionInputBuffer buffer, LineParser parser, HttpResponseFactory responseFactory, HttpParams params)
          Deprecated. (4.3) use DefaultHttpResponseParser( SessionInputBuffer, LineParser, HttpResponseFactory, MessageConstraints)
DefaultHttpResponseParser(SessionInputBuffer buffer, LineParser lineParser, HttpResponseFactory responseFactory, MessageConstraints constraints)
          Creates new instance of DefaultHttpResponseParser.
DefaultHttpResponseParser(SessionInputBuffer buffer, MessageConstraints constraints)
          Creates new instance of DefaultHttpResponseParser.
 
Method Summary
protected  HttpResponse parseHead(SessionInputBuffer sessionBuffer)
           
protected  boolean reject(CharArrayBuffer line, int count)
           
 
Methods inherited from class org.apache.http.impl.io.AbstractMessageParser
parse, parseHeaders, parseHeaders
 
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 lineParser,
                                 HttpResponseFactory responseFactory,
                                 MessageConstraints constraints)
Creates new instance of DefaultHttpResponseParser.

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

DefaultHttpResponseParser

public DefaultHttpResponseParser(SessionInputBuffer buffer,
                                 MessageConstraints constraints)
Creates new instance of DefaultHttpResponseParser.

Parameters:
buffer - the session input buffer.
constraints - the message constraints. If null MessageConstraints.DEFAULT will be used.
Since:
4.3

DefaultHttpResponseParser

public DefaultHttpResponseParser(SessionInputBuffer buffer)
Creates new instance of DefaultHttpResponseParser.

Parameters:
buffer - the session input buffer.
Since:
4.3
Method Detail

parseHead

protected HttpResponse parseHead(SessionInputBuffer sessionBuffer)
                          throws IOException,
                                 HttpException
Specified by:
parseHead in class AbstractMessageParser<HttpResponse>
Throws:
IOException
HttpException

reject

protected boolean reject(CharArrayBuffer line,
                         int count)


Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.