org.apache.http.impl.nio.codecs

## Class DefaultHttpResponseWriter

- java.lang.Object
- - org.apache.http.impl.nio.codecs.AbstractMessageWriter<HttpResponse>
  - - org.apache.http.impl.nio.codecs.DefaultHttpResponseWriter

- All Implemented Interfaces:
    NHttpMessageWriter<HttpResponse>

      @NotThreadSafe
      public class DefaultHttpResponseWriter
      extends AbstractMessageWriter<HttpResponse>

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

- - ### Field Summary

    - ### Fields inherited from class org.apache.http.impl.nio.codecs.AbstractMessageWriter

      `lineBuf, lineFormatter, sessionBuffer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultHttpResponseWriter(SessionOutputBuffer buffer)`
    `DefaultHttpResponseWriter(SessionOutputBuffer buffer, LineFormatter formatter)` Creates an instance of DefaultHttpResponseWriter.
    `DefaultHttpResponseWriter(SessionOutputBuffer buffer, LineFormatter formatter, HttpParams params)` Deprecated. (4.3) use `DefaultHttpResponseWriter(SessionOutputBuffer, LineFormatter)`

  - ### Method Summary

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

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

      `reset, write`

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

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

- - ### Constructor Detail

    - #### DefaultHttpResponseWriter

          @Deprecated
          public DefaultHttpResponseWriter(SessionOutputBuffer buffer,
                                              LineFormatter formatter,
                                              HttpParams params)

      Deprecated. (4.3) use `DefaultHttpResponseWriter(SessionOutputBuffer, LineFormatter)`

    - #### DefaultHttpResponseWriter

          public DefaultHttpResponseWriter(SessionOutputBuffer buffer,
                                   LineFormatter formatter)

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

    - #### DefaultHttpResponseWriter

          public DefaultHttpResponseWriter(SessionOutputBuffer buffer)

      Since:
        4.3

  - ### Method Detail

    - #### writeHeadLine

          protected void writeHeadLine(HttpResponse message)
                                throws IOException

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

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