Class BufferedContentSink
java.lang.Object
org.eclipse.jetty.io.content.BufferedContentSink
- All Implemented Interfaces:
 Content.Sink
A Content.Sink backed by another Content.Sink.
Any content written to this Content.Sink is buffered,
then written to the delegate using
Content.Sink.write(boolean, ByteBuffer, Callback). 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionBufferedContentSink(Content.Sink delegate, ByteBufferPool.Sized sizedPool, int maxBufferSize) BufferedContentSink(Content.Sink delegate, ByteBufferPool bufferPool, boolean direct, int maxAggregationSize, int maxBufferSize)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidFlush the buffered content.voidwrite(boolean last, ByteBuffer byteBuffer, Callback callback) Writes the givenByteBuffer, notifying theCallbackwhen the write is complete. 
- 
Field Details
- 
FLUSH_BUFFER
 
 - 
 - 
Constructor Details
- 
BufferedContentSink
public BufferedContentSink(Content.Sink delegate, ByteBufferPool bufferPool, boolean direct, int maxAggregationSize, int maxBufferSize)  - 
BufferedContentSink
public BufferedContentSink(Content.Sink delegate, ByteBufferPool.Sized sizedPool, int maxBufferSize)  
 - 
 - 
Method Details
- 
write
Description copied from interface:Content.SinkWrites the given
ByteBuffer, notifying theCallbackwhen the write is complete.Implementations guarantee that calls to this method are safely reentrant so that stack overflows are avoided in the case of mutual recursion between the execution of the
Callbackand a call to this method.- Specified by:
 writein interfaceContent.Sink- Parameters:
 last- whether the ByteBuffer is the last to writebyteBuffer- the ByteBuffer to writecallback- the callback to notify when the write operation is complete
 - 
flush
Flush the buffered content.- Parameters:
 callback- Callback completed when the flush is complete
 
 -