Class AbstractByteSequence

    • Constructor Detail

      • AbstractByteSequence

        public AbstractByteSequence()
    • Method Detail

      • subSequence

        public ByteSequence subSequence​(int ofStart,
                                        int ofEnd)
        Returns a new 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 bytes) of the returned sequence is ofEnd - ofStart, so if ofStart == ofEnd then an empty sequence is returned.
        Specified by:
        subSequence in interface ByteSequence
        Parameters:
        ofStart - the start index, inclusive
        ofEnd - the end index, exclusive
        Returns:
        the specified subsequence
      • toBinary

        public Binary toBinary()
        Returns a Binary object that holds the contents of this ByteSequence.
        Specified by:
        toBinary in interface ByteSequence
        Returns:
        the contents of this ByteSequence as a Binary object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object