Module 

Interface BufferPipeOutputStream.BufferWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void accept​(Pooled<java.nio.ByteBuffer> pooledBuffer, boolean eof)
      Accept a buffer.
      void flush()
      Flushes this stream by writing any buffered output to the underlying stream.
      Pooled<java.nio.ByteBuffer> getBuffer​(boolean firstBuffer)
      Get a new buffer to be filled.
    • Method Detail

      • getBuffer

        Pooled<java.nio.ByteBuffer> getBuffer​(boolean firstBuffer)
                                       throws java.io.IOException
        Get a new buffer to be filled. The new buffer may, for example, include a prepended header. This method may block until a buffer is available or until some other condition, such as flow control, is met.
        Parameters:
        firstBuffer - true if this is the first buffer in the stream, false otherwise
        Returns:
        the new buffer
        Throws:
        java.io.IOException - if an I/O error occurs
      • accept

        void accept​(Pooled<java.nio.ByteBuffer> pooledBuffer,
                    boolean eof)
             throws java.io.IOException
        Accept a buffer. If this is the last buffer that will be sent, the eof flag will be set to true. This method should block until the entire buffer is consumed, or an error occurs. This method may also block until some other condition, such as flow control, is met.
        Parameters:
        pooledBuffer - the buffer to send
        eof - true if this is the last buffer which will be sent
        Throws:
        java.io.IOException - if an I/O error occurs
      • flush

        void flush()
            throws java.io.IOException
        Flushes this stream by writing any buffered output to the underlying stream. This method should block until the data is fully flushed. This method may also block until some other condition, such as flow control, is met.
        Specified by:
        flush in interface java.io.Flushable
        Throws:
        java.io.IOException - If an I/O error occurs