Class ByteBufferAccumulator

java.lang.Object
org.eclipse.jetty.io.ByteBufferAccumulator
All Implemented Interfaces:
AutoCloseable

public class ByteBufferAccumulator extends Object implements AutoCloseable
Accumulates data into a list of ByteBuffers which can then be combined into a single buffer or written to an OutputStream. The buffer list automatically grows as data is written to it, the buffers are taken from the supplied ByteBufferPool or freshly allocated if one is not supplied. The method ensureBuffer(int, int) is used to write directly to the last buffer stored in the buffer list, if there is less than a certain amount of space available in that buffer then a new one will be allocated and returned instead.
See Also: