org.apache.hc.core5.http.io

## Interface HttpMessageWriter<T extends MessageHeaders>

- All Known Implementing Classes:
    AbstractMessageWriter, DefaultHttpRequestWriter, DefaultHttpResponseWriter

      public interface HttpMessageWriter<T extends MessageHeaders>

  Message writer intended to serialize HTTP message head to an output stream.
  Since:
    4.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `write(T message, SessionOutputBuffer buffer, OutputStream outputStream)` Serializes an instance of `MessageHeaders` to the given output stream.

- - ### Method Detail

    - #### write

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

      Serializes an instance of `MessageHeaders` to the given output stream.
      Parameters:
        `message` - HTTP message head
        `buffer` - session output buffer
      Throws:
        `IOException` - in case of an I/O error
        `HttpException` - in case of HTTP protocol violation

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