Package com.tangosol.util
Class AbstractByteSequence
java.lang.Object
com.tangosol.util.AbstractByteSequence
- All Implemented Interfaces:
ByteSequence
- Direct Known Subclasses:
AbstractByteSequence.AggregateByteSequence
,AbstractByteSequence.PartialByteSequence
A simple base class for ByteSequence implementations.
- Since:
- Coherence 3.7
- Author:
- cp 2010-06-29
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A naive ByteSequence that glues two ByteSequence instances together.static class
A naive ByteSequence that represents a portion of another ByteSequence. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
subSequence
(int ofStart, int ofEnd) Returns a newByteSequence
that is a subsequence of this sequence.toBinary()
Returns a Binary object that holds the contents of this ByteSequence.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.tangosol.util.ByteSequence
byteAt, length
-
Constructor Details
-
AbstractByteSequence
public AbstractByteSequence()
-
-
Method Details
-
subSequence
Returns a newByteSequence
that is a subsequence of this sequence. The subsequence starts with thebyte
value at the specified index and ends with thebyte
value at index ofEnd - 1. The length (inbyte
s) of the returned sequence is ofEnd - ofStart, so if ofStart == ofEnd then an empty sequence is returned.- Specified by:
subSequence
in interfaceByteSequence
- Parameters:
ofStart
- the start index, inclusiveofEnd
- the end index, exclusive- Returns:
- the specified subsequence
-
toBinary
Returns a Binary object that holds the contents of this ByteSequence.- Specified by:
toBinary
in interfaceByteSequence
- Returns:
- the contents of this ByteSequence as a Binary object
-
hashCode
public int hashCode() -
equals
-
toString
-