public interface StreamWindow extends Closeable
Implementations may use different buffering strategies for remembering recent stream data.
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.couchbase.client.core.deps.io.netty.buffer.ByteBuf buffer)
Appends the given buffer to the end of the stream.
|
void |
close()
Releases all buffers owned by the window.
|
byte[] |
getBytes(long startOffset,
long endOffset)
Returns a region of the stream as a byte array.
|
void |
releaseBefore(long offset)
Forgets any bytes with stream offsets lower then the given offset.
|
void add(com.couchbase.client.core.deps.io.netty.buffer.ByteBuf buffer)
void releaseBefore(long offset)
offset - offset relative to the start of the stream.IndexOutOfBoundsException - if the given offset is positive and outside the windowbyte[] getBytes(long startOffset,
long endOffset)
startOffset - region start offset relative to beginning of stream.endOffset - region end offset relative to beginning of stream.IndexOutOfBoundsException - if the window does not contain all of the requested regionvoid close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2024 Couchbase, Inc.. All rights reserved.