org.apache.hc.core5.http.nio

## Interface StreamChannel<T extends Buffer>

- Type Parameters:
    `T` - data container accepted by the channel.
  All Known Subinterfaces:
    DataStreamChannel

      @Contract(threading=SAFE)
      public interface StreamChannel<T extends Buffer>

  Abstract data stream channel.

  Implementations are expected to be thread-safe.

  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `endStream()` Terminates the underlying data stream and optionally writes a closing sequence.
    `int` | `write(T src)` Writes data from the data container into the underlying data stream.

- - ### Method Detail

    - #### write

          int write(T src)
                    throws IOException

      Writes data from the data container into the underlying data stream.
      Parameters:
        `src` - source of data
      Returns:
        The number of elements written, possibly zero
      Throws:
        `IOException`

    - #### endStream

          void endStream()
                         throws IOException

      Terminates the underlying data stream and optionally writes a closing sequence.
      Throws:
        `IOException`

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