Class ByteBufferCallbackAccumulator
java.lang.Object
org.eclipse.jetty.io.ByteBufferCallbackAccumulator
@Deprecated(forRemoval=true,
since="12.1.0")
public class ByteBufferCallbackAccumulator
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
This class can be used to accumulate pairs of ByteBuffer
and Callback
, and eventually copy
these into a single ByteBuffer
or byte array and succeed the callbacks.
This class is not thread safe and callers must do mutual exclusion.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEntry
(ByteBuffer buffer, Callback callback) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.Get the total length of the content in the accumulator..byte[]
Deprecated, for removal: This API element is subject to removal in a future version.void
writeTo
(ByteBuffer buffer) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
ByteBufferCallbackAccumulator
public ByteBufferCallbackAccumulator()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
addEntry
Deprecated, for removal: This API element is subject to removal in a future version. -
getLength
public int getLength()Deprecated, for removal: This API element is subject to removal in a future version.Get the total length of the content in the accumulator..- Returns:
- the total length of the content in the accumulator.
-
takeByteArray
public byte[] takeByteArray()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- a newly allocated byte array containing all content written into the accumulator.
-
writeTo
Deprecated, for removal: This API element is subject to removal in a future version. -
fail
Deprecated, for removal: This API element is subject to removal in a future version.
-
RetainableByteBuffer.DynamicCapacity