Class AsyncOutputStream

    • Constructor Detail

      • AsyncOutputStream

        public AsyncOutputStream()
    • Method Detail

      • asyncFlush

        public abstract CompletionStage<Void> asyncFlush()
        Flushes this async output stream.
        Returns:
        a CompletionStage notified on completion of the flush operation.
      • asyncWrite

        public CompletionStage<Void> asyncWrite​(byte[] bytes)
        Writes to this async output stream. Equivalent to asyncWrite(bytes, 0, bytes.length.
        Parameters:
        bytes - the bytes to write
        Returns:
        a CompletionStage notified on completion of the write operation.
      • asyncWrite

        public abstract CompletionStage<Void> asyncWrite​(byte[] bytes,
                                                         int offset,
                                                         int length)
        Writes to this async output stream.
        Parameters:
        bytes - the bytes to write
        offset - the offset from which to start writing in the given byte array.
        length - the number of bytes to write from the given byte array
        Returns:
        a CompletionStage notified on completion of the write operation.