public static class AbstractByteSequence.AggregateByteSequence extends AbstractByteSequence
AbstractByteSequence.AggregateByteSequence, AbstractByteSequence.PartialByteSequence
Constructor and Description |
---|
AggregateByteSequence(ByteSequence seqFirst,
ByteSequence seqSecond)
Construct an AggregateByteSequence from two ByteSequence objects.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteAt(int of)
Determine the n-th byte of the byte sequence.
|
int |
length()
Determine the number of bytes of data represented by this
ByteSequence.
|
ByteSequence |
subSequence(int ofStart,
int ofEnd)
Returns a new
ByteSequence that is a subsequence of this
sequence. |
equals, hashCode, toBinary, toString
public AggregateByteSequence(ByteSequence seqFirst, ByteSequence seqSecond)
seqFirst
- the first ByteSequenceseqSecond
- the second ByteSequencepublic int length()
public byte byteAt(int of)
of
- the zero-based byte offset within the sequence of bytes
(0 <= of < ByteSequence.length()
)public ByteSequence subSequence(int ofStart, int ofEnd)
ByteSequence
that is a subsequence of this
sequence. The subsequence starts with the byte
value at the
specified index and ends with the byte
value at index
ofEnd - 1. The length (in byte
s) of the returned
sequence is ofEnd - ofStart, so if ofStart == ofEnd
then an empty sequence is returned.subSequence
in interface ByteSequence
subSequence
in class AbstractByteSequence
ofStart
- the start index, inclusiveofEnd
- the end index, exclusive