Class AbstractByteSequence

java.lang.Object
com.tangosol.util.AbstractByteSequence
All Implemented Interfaces:
ByteSequence
Direct Known Subclasses:
AbstractByteSequence.AggregateByteSequence, AbstractByteSequence.PartialByteSequence

public abstract class AbstractByteSequence extends Object implements ByteSequence
A simple base class for ByteSequence implementations.
Since:
Coherence 3.7
Author:
cp 2010-06-29
  • Constructor Details

    • AbstractByteSequence

      public AbstractByteSequence()
  • Method Details

    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object