Package org.apache.tomcat.util.net
Class WriteBuffer
- java.lang.Object
- 
- org.apache.tomcat.util.net.WriteBuffer
 
- 
 public class WriteBuffer extends java.lang.ObjectProvides an expandable set of buffers for writes. Non-blocking writes can be of any size and may not be able to be written immediately or wholly contained in the buffer used to perform the writes to the next layer. This class provides a buffering capability to allow such writes to return immediately and also allows for the user provided buffers to be re-used / recycled as required.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceWriteBuffer.SinkInterface implemented by clients of the WriteBuffer to enable data to be written back out from the buffer.
 - 
Constructor SummaryConstructors Constructor Description WriteBuffer(int bufferSize)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.nio.ByteBuffer from)booleanisEmpty()booleanwrite(WriteBuffer.Sink sink, boolean blocking)
 
- 
- 
- 
Method Detail- 
addpublic void add(java.nio.ByteBuffer from) 
 - 
isEmptypublic boolean isEmpty() 
 - 
writepublic boolean write(WriteBuffer.Sink sink, boolean blocking) throws java.io.IOException - Throws:
- java.io.IOException
 
 
- 
 
-