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

    java.lang.Object
      org.apache.http.impl.nio.codecs.AbstractMessageParser<HttpRequest>
          org.apache.http.impl.nio.codecs.DefaultHttpRequestParser

All Implemented Interfaces:
  NHttpMessageParser<HttpRequest>

    @NotThreadSafe
    public class DefaultHttpRequestParser

extends AbstractMessageParser<HttpRequest>

Default `NHttpMessageParser` implementation for `HttpRequest`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
`DefaultHttpRequestParser(SessionInputBuffer buffer, LineParser parser, HttpRequestFactory requestFactory, HttpParams params)`

Method Summary
`protected HttpRequest` `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

### DefaultHttpRequestParser

    public DefaultHttpRequestParser(SessionInputBuffer buffer,
                                    LineParser parser,
                                    HttpRequestFactory requestFactory,
                                    HttpParams params)

Method Detail

### createMessage

    protected HttpRequest 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<HttpRequest>`
  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.