public abstract class ByteIterableBase extends java.lang.Object implements ByteIterable
ByteIterable implementations.| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
bytes |
protected int |
length |
protected static byte[][] |
SINGLE_BYTES |
EMPTY, EMPTY_BYTES, EMPTY_ITERATOR| Constructor and Description |
|---|
ByteIterableBase() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(@NotNull ByteIterable right) |
boolean |
equals(java.lang.Object obj) |
protected void |
fillBytes() |
protected void |
fillBytes(byte firstByte,
@NotNull ByteIterator it) |
static void |
fillBytes(@NotNull ByteIterable bi,
@NotNull LightOutputStream output) |
protected void |
fillBytes(@NotNull ByteIterator it) |
byte[] |
getBytesUnsafe() |
protected abstract ByteIterator |
getIterator() |
int |
getLength() |
ByteIterable |
getSource() |
int |
hashCode() |
ByteIterator |
iterator() |
static @NotNull byte[] |
readIterable(@NotNull ByteIterable it) |
static byte[] |
readIterator(@NotNull ByteIterator it,
int size) |
static byte[] |
readIteratorSafe(@NotNull ByteIterator it,
int size) |
@NotNull ByteIterable |
subIterable(int offset,
int length) |
java.lang.String |
toString() |
static java.lang.String |
toString(@Nullable byte[] bytes,
int start,
int end) |
protected static final byte[][] SINGLE_BYTES
protected byte[] bytes
protected int length
public int compareTo(@NotNull
@NotNull ByteIterable right)
compareTo in interface java.lang.Comparable<ByteIterable>public ByteIterator iterator()
iterator in interface ByteIterablepublic byte[] getBytesUnsafe()
getBytesUnsafe in interface ByteIterableByteIterable. May return array with length greater than ByteIterable.getLength().public int getLength()
getLength in interface ByteIterableByteIterable.@NotNull public @NotNull ByteIterable subIterable(int offset, int length)
subIterable in interface ByteIterableoffset - start offset, inclusivelength - length of the sub-iterableByteIterable starting from offset.public ByteIterable getSource()
protected abstract ByteIterator getIterator()
protected void fillBytes()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String toString(@Nullable
@Nullable byte[] bytes,
int start,
int end)
public static void fillBytes(@NotNull
@NotNull ByteIterable bi,
@NotNull
@NotNull LightOutputStream output)
public static byte[] readIterator(@NotNull
@NotNull ByteIterator it,
int size)
public static byte[] readIteratorSafe(@NotNull
@NotNull ByteIterator it,
int size)
@NotNull
public static @NotNull byte[] readIterable(@NotNull
@NotNull ByteIterable it)
protected void fillBytes(@NotNull
@NotNull ByteIterator it)
protected void fillBytes(byte firstByte,
@NotNull
@NotNull ByteIterator it)