Package com.yahoo.container.jdisc
Class MaxPendingContentChannelOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.yahoo.container.jdisc.ContentChannelOutputStream
-
- com.yahoo.container.jdisc.MaxPendingContentChannelOutputStream
-
- All Implemented Interfaces:
com.yahoo.io.WritableByteTransmitter
,Closeable
,Flushable
,AutoCloseable
public class MaxPendingContentChannelOutputStream extends ContentChannelOutputStream
- Author:
- baldersheim
-
-
Constructor Summary
Constructors Constructor Description MaxPendingContentChannelOutputStream(com.yahoo.jdisc.handler.ContentChannel endpoint, long maxPending)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
Flush the internal buffers, does not touch the ContentChannel.void
send(ByteBuffer src)
Write a ByteBuffer to the wrapped ContentChannel.-
Methods inherited from class com.yahoo.container.jdisc.ContentChannelOutputStream
close, nonCopyingWrite, nonCopyingWrite, send, write, write, write, written
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
send
public void send(ByteBuffer src) throws IOException
Description copied from class:ContentChannelOutputStream
Write a ByteBuffer to the wrapped ContentChannel. Do invokeContentChannelOutputStream.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 interfacecom.yahoo.io.WritableByteTransmitter
- Overrides:
send
in classContentChannelOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
Description copied from class:ContentChannelOutputStream
Flush the internal buffers, does not touch the ContentChannel.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classContentChannelOutputStream
- Throws:
IOException
-
-