byte values. This interface
provides uniform, read-only access to many different kinds of byte sequences.
This interface does not refine the general contracts of the
equals and hashCode methods. The result of comparing two objects that implement ByteSequence is
therefore, in general, undefined. Each object may be implemented by a different class, and there
is no guarantee that each class will be capable of testing its instances for equality with those
of the other. It is therefore inappropriate to use arbitrary ByteSequence instances as
elements in a set or as keys in a map.
| Modifier and Type | Method and Description |
|---|---|
| public byte | Returns: the specifiedbyte valuethe index of the index)byte value to be returnedReturns the |
| public default IntStream | Returns: an IntStream of byte values from this sequenceReturns a stream of |
| public static ByteSequence | |
| public int | |
| public default ByteSequence | Returns: the specified subsequencethe start index, inclusive startIndex, int the end index, exclusive endIndex)Returns a |
| public default byte[] | toByteArray()
Returns a |
| byteAt | back to summary |
|---|---|
| public byte byteAt(int index) Returns the
| |
| bytes | back to summary |
|---|---|
| public default IntStream bytes() Returns a stream of
| |
| create | back to summary |
|---|---|
| public static ByteSequence create(byte[] buffer) Creates a
| |
| length | back to summary |
|---|---|
| public int length() Returns the length of this byte sequence.
| |
| subSequence | back to summary |
|---|---|
| public default ByteSequence subSequence(int startIndex, int endIndex) Returns a
| |
| toByteArray | back to summary |
|---|---|
| public default byte[] toByteArray() Returns a
| |