Class MaxPendingContentChannelOutputStream

  • All Implemented Interfaces:
    com.yahoo.io.WritableByteTransmitter, java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class MaxPendingContentChannelOutputStream
    extends ContentChannelOutputStream
    Author:
    baldersheim
    • Constructor Detail

      • MaxPendingContentChannelOutputStream

        public MaxPendingContentChannelOutputStream​(com.yahoo.jdisc.handler.ContentChannel endpoint,
                                                    long maxPending)
    • Method Detail

      • send

        public void send​(java.nio.ByteBuffer src)
                  throws java.io.IOException
        Description copied from class: ContentChannelOutputStream
        Write a ByteBuffer to the wrapped ContentChannel. Do invoke ContentChannelOutputStream.flush() before send(ByteBuffer) to avoid garbled output if the stream API has been accessed before using the ByteBuffer based API. As with ContentChannel, this transfers ownership of the ByteBuffer to this stream.
        Specified by:
        send in interface com.yahoo.io.WritableByteTransmitter
        Overrides:
        send in class ContentChannelOutputStream
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from class: ContentChannelOutputStream
        Flush the internal buffers, does not touch the ContentChannel.
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class ContentChannelOutputStream
        Throws:
        java.io.IOException