org.apache.hc.core5.http.nio

## Interface NHttpMessageWriter<T extends MessageHeaders>

- All Known Implementing Classes:
    AbstractMessageWriter, DefaultHttpRequestWriter, DefaultHttpResponseWriter

      public interface NHttpMessageWriter<T extends MessageHeaders>

  Message writer intended to serialize HTTP message head to a session buffer.
  Since:
    4.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `reset()` Resets the writer.
    `void` | `write(T message, SessionOutputBuffer buffer)` Writes out the HTTP message head.

- - ### Method Detail

    - #### reset

          void reset()

      Resets the writer. The writer will be ready to start serializing another HTTP message.

    - #### write

          void write(T message,
                   SessionOutputBuffer buffer)
                     throws IOException,
                            HttpException

      Writes out the HTTP message head.
      Parameters:
        `message` - HTTP message.
        `buffer` - session output buffer.
      Throws:
        `IOException` - in case of an I/O error.
        `HttpException` - in case the HTTP message is malformed or violates the HTTP protocol.

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