public interface IByteArrayBuffer extends IDataRecord, IManagedByteArray
ByteBuffer
.Modifier and Type | Method and Description |
---|---|
byte[] |
array()
The backing byte[] WILL be transparently replaced if the buffer capacity
is extended.
|
int |
capacity()
The capacity of the buffer.
|
int |
len()
The length of the slice is always the capacity of the backing byte[].
|
int |
limit()
The read limit (there is no write limit on the buffer since the capacity
will be automatically extended on overflow).
|
int |
off()
The offset of the slice into the backing byte[] is always zero.
|
int |
pos()
The current position in the buffer.
|
int |
remaining()
The #of bytes remaining in the buffer before it would overflow.
|
asByteBuffer, get, get, getBit, getByte, getDouble, getFloat, getInt, getLong, getShort, put, put, putByte, putDouble, putFloat, putInt, putLong, putShort, setBit, slice
append, append, append, ensureCapacity, ensureFree, reset
toByteArray
byte[] array()
array
in interface IByteArraySlice
int off()
IByteArraySlice.array()
.off
in interface IByteArraySlice
int len()
IByteArraySlice.array()
.
Note: IByteArraySlice.len()
has different semantics for some
concrete implementations. ByteArrayBuffer.len()
always returns
the capacity of the backing byte[] while ByteArrayBuffer.pos()
returns the #of bytes written onto the backing buffer. In contrast,
KeyBuilder.len()
is always the #of bytes written onto the backing
buffer.len
in interface IByteArraySlice
int capacity()
capacity
in interface IManagedByteArray
int pos()
Note: The method name was choose to avoid a collision with
RepositionableStream.position()
.
int limit()
int remaining()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.