Class ChunkBuffer
java.lang.Object
software.amazon.awssdk.core.internal.async.ChunkBuffer
Class that will buffer incoming BufferBytes to chunks of bufferSize.
If totalBytes is not provided, i.e. content-length is unknown,
getBufferedData()
should be used in the Subscriber's
onComplete()
to check for a final chunk that is smaller than the chunk size, and send if present.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkBuffer.Builder
builder()
Retrieve the current buffered data.split
(ByteBuffer inputByteBuffer) Split the inputByteBuffer
into multiple smallerByteBuffer
s, each of which containschunkSize
worth of bytes.
-
Method Details
-
builder
-
split
Split the inputByteBuffer
into multiple smallerByteBuffer
s, each of which containschunkSize
worth of bytes. If the last chunk of the input ByteBuffer contains less thanchunkSize
data, the last chunk will be buffered. -
getBufferedData
Retrieve the current buffered data.
-