public interface ByteIterable extends java.lang.Comparable<ByteIterable>
Environment, any key and value should be a ByteIterable.
ByteIterable is a mix of iterable and array. It allows to lazily enumerate bytes without boxing.
On the other hand, you can get its length using method getLength(). Generally, iterating over bytes
of ByteIterable is performed by means of getting ByteIterator.| Modifier and Type | Field and Description |
|---|---|
static ByteIterable |
EMPTY |
static byte[] |
EMPTY_BYTES |
static ByteIterator |
EMPTY_ITERATOR |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytesUnsafe() |
int |
getLength() |
ByteIterator |
iterator() |
@NotNull ByteIterable |
subIterable(int offset,
int length) |
static final byte[] EMPTY_BYTES
static final ByteIterator EMPTY_ITERATOR
static final ByteIterable EMPTY
ByteIterator iterator()
byte[] getBytesUnsafe()
ByteIterable. May return array with length greater than getLength().int getLength()
ByteIterable.@NotNull @NotNull ByteIterable subIterable(int offset, int length)
offset - start offset, inclusivelength - length of the sub-iterableByteIterable starting from offset.