Class SimpleIoOutputStream

All Implemented Interfaces:
Closeable, AutoCloseable, Channel, Closeable, IoOutputStream

public class SimpleIoOutputStream extends AbstractCloseable implements IoOutputStream
An implementation of IoOutputStream using a synchronous ChannelOutputStream.
  • Field Details

  • Constructor Details

  • Method Details

    • doCloseImmediately

      protected void doCloseImmediately()
      Description copied from class: AbstractCloseable

      doCloseImmediately is called once and only once with state == Immediate

      Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing

      Overrides:
      doCloseImmediately in class AbstractCloseable
    • writeBuffer

      public IoWriteFuture writeBuffer(Buffer buffer) throws IOException
      Description copied from interface: IoOutputStream
      Write the given buffer.
      Specified by:
      writeBuffer in interface IoOutputStream
      Parameters:
      buffer - the data to write. NOTE: the buffer must not be touched until the returned write future is completed.
      Returns:
      An IoWriteFuture that can be used to check when the data has actually been written.
      Throws:
      IOException - if an error occurred when writing the data