Class ChunkAccumulator
java.lang.Object
org.eclipse.jetty.io.ChunkAccumulator
Deprecated, for removal: This API element is subject to removal in a future version.
An accumulator of 
Content.Chunks used to facilitate minimal copy
aggregation of multiple chunks.- 
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(Content.Chunk chunk) Deprecated, for removal: This API element is subject to removal in a future version.Add aContent.Chunkto the accumulator.voidclose()Deprecated, for removal: This API element is subject to removal in a future version.intlength()Deprecated, for removal: This API element is subject to removal in a future version.Get the total length of the accumulatedContent.Chunks.CompletableFuture<byte[]> readAll(Content.Source source) Deprecated, for removal: This API element is subject to removal in a future version.CompletableFuture<byte[]> readAll(Content.Source source, int maxSize) Deprecated, for removal: This API element is subject to removal in a future version.readAll(Content.Source source, ByteBufferPool pool, boolean direct, int maxSize) Deprecated, for removal: This API element is subject to removal in a future version.byte[]take()Deprecated, for removal: This API element is subject to removal in a future version.take(ByteBufferPool pool, boolean direct) Deprecated, for removal: This API element is subject to removal in a future version. 
- 
Constructor Details
- 
ChunkAccumulator
public ChunkAccumulator()Deprecated, for removal: This API element is subject to removal in a future version. 
 - 
 - 
Method Details
- 
add
Deprecated, for removal: This API element is subject to removal in a future version.Add aContent.Chunkto the accumulator.- Parameters:
 chunk- TheContent.Chunkto accumulate. If a reference is kept to the chunk (rather than a copy), it will be retained.- Returns:
 - true if the 
Content.Chunkhad content and was added to the accumulator. - Throws:
 ArithmeticException- if more thatInteger.MAX_VALUEbytes are added.IllegalArgumentException- if the passedContent.Chunkis afailure.
 - 
length
public int length()Deprecated, for removal: This API element is subject to removal in a future version.Get the total length of the accumulatedContent.Chunks.- Returns:
 - The total length in bytes.
 
 - 
take
public byte[] take()Deprecated, for removal: This API element is subject to removal in a future version. - 
take
Deprecated, for removal: This API element is subject to removal in a future version. - 
close
public void close()Deprecated, for removal: This API element is subject to removal in a future version. - 
readAll
@Deprecated(forRemoval=true, since="12.0.15") public CompletableFuture<byte[]> readAll(Content.Source source) Deprecated, for removal: This API element is subject to removal in a future version. - 
readAll
@Deprecated(forRemoval=true, since="12.0.15") public CompletableFuture<byte[]> readAll(Content.Source source, int maxSize) Deprecated, for removal: This API element is subject to removal in a future version. - 
readAll
@Deprecated(forRemoval=true, since="12.0.15") public CompletableFuture<RetainableByteBuffer> readAll(Content.Source source, ByteBufferPool pool, boolean direct, int maxSize) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
 source- TheContent.Sourceto readpool- TheByteBufferPoolto acquire the buffer from, or null for a nonRetainablebufferdirect- True if the buffer should be direct.maxSize- The maximum size to read, or -1 for no limit- Returns:
 - A 
CompletableFuturethat will be completed when the complete content is read or failed if the max size is exceeded or there is a read error. 
 
 - 
 
RetainableByteBuffer.DynamicCapacity