public interface Range<T extends Range<T>>
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Get all data in this range
|
boolean |
getBytes(ByteBuffer buffer)
Read all data in this range to the provided buffer.
|
Range<T> |
getSubrange(long offset)
Build a subrange of this data range.
|
Range<T> |
getSubrange(long offset,
long length)
Build a subrange of this data range.
|
long |
length() |
void |
putBytes(byte[] block)
Put data at the beginning of this range.
|
void |
putBytes(ByteBufferView buffer)
Put data from the provided buffer at the beginning of this range.
|
long length()
Range<T> getSubrange(long offset, long length)
offset
- Offset from the beginning of the original data range in bytes, inclusivelength
- Length of the new data rangeRange<T> getSubrange(long offset)
offset
- Offset from the beginning of the original data range in bytes, inclusivebyte[] getBytes()
boolean getBytes(ByteBuffer buffer)
void putBytes(byte[] block)
block
- Block of data with length less than or equal to length()
of this rangeIllegalArgumentException
- if data does not fit in this rangevoid putBytes(ByteBufferView buffer)
Copyright © 2016–2021. All rights reserved.