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

    java.lang.Object
      org.apache.http.impl.nio.codecs.AbstractMessageParser<HttpResponse>
          org.apache.http.impl.nio.codecs.DefaultHttpResponseParser

All Implemented Interfaces:
  NHttpMessageParser<HttpResponse>

    @NotThreadSafe
    public class DefaultHttpResponseParser

extends AbstractMessageParser<HttpResponse>

Default `NHttpMessageParser` implementation for `HttpResponse`s.

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

- `CoreConnectionPNames.MAX_HEADER_COUNT`
- `CoreConnectionPNames.MAX_LINE_LENGTH`

Since:
  4.1

Field Summary

Fields inherited from class org.apache.http.impl.nio.codecs.AbstractMessageParser
`lineParser`

Constructor Summary
`DefaultHttpResponseParser(SessionInputBuffer buffer, LineParser parser, HttpResponseFactory responseFactory, HttpParams params)`

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

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

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-2013 The Apache Software Foundation. All Rights Reserved.