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
- Author:
- baldersheim
-
Constructor Summary
ConstructorDescriptionMaxPendingContentChannelOutputStream
(com.yahoo.jdisc.handler.ContentChannel endpoint, long maxPending) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Constructor Details
-
MaxPendingContentChannelOutputStream
public MaxPendingContentChannelOutputStream(com.yahoo.jdisc.handler.ContentChannel endpoint, long maxPending)
-
-
Method Details
-
send
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
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
-