org.apache.hc.core5.http.impl.nio

## Class DefaultHttpRequestWriter<T extends HttpRequest>

- java.lang.Object
- - org.apache.hc.core5.http.impl.nio.AbstractMessageWriter<T>
  - - org.apache.hc.core5.http.impl.nio.DefaultHttpRequestWriter<T>

- All Implemented Interfaces:
    NHttpMessageWriter<T>

      public class DefaultHttpRequestWriter<T extends HttpRequest>
      extends AbstractMessageWriter<T>

  Default `NHttpMessageWriter` implementation for `HttpRequest`s.
  Since:
    4.1

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultHttpRequestWriter()`
    `DefaultHttpRequestWriter(LineFormatter formatter)` Creates an instance of DefaultHttpRequestWriter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `writeHeadLine(T message, CharArrayBuffer lineBuf)` Writes out the first line of `HttpMessage`.

    - ### Methods inherited from class org.apache.hc.core5.http.impl.nio.AbstractMessageWriter

      `reset, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultHttpRequestWriter

          public DefaultHttpRequestWriter(LineFormatter formatter)

      Creates an instance of DefaultHttpRequestWriter.
      Parameters:
        `formatter` - the line formatter If `null` `BasicLineFormatter.INSTANCE` will be used.
      Since:
        4.3

    - #### DefaultHttpRequestWriter

          public DefaultHttpRequestWriter()

      Since:
        4.3

  - ### Method Detail

    - #### writeHeadLine

          protected void writeHeadLine(T message,
                           CharArrayBuffer lineBuf)
                                throws IOException

      Description copied from class: `AbstractMessageWriter`
      Writes out the first line of `HttpMessage`.
      Specified by:
        `writeHeadLine` in class `AbstractMessageWriter<T extends HttpRequest>`
      Parameters:
        `message` - HTTP message.
      Throws:
        `IOException`

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