Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.util
Class AbstractByteSequence

java.lang.Object
  extended by com.tangosol.util.AbstractByteSequence

All Implemented Interfaces:
ByteSequence
Direct Known Subclasses:
AbstractByteSequence.AggregateByteSequence, AbstractByteSequence.PartialByteSequence

public abstract class AbstractByteSequence
extends java.lang.Object
implements ByteSequence

A simple base class for ByteSequence implementations.

Since:
Coherence 3.7
Author:
cp 2010-06-29

Nested Class Summary
static class AbstractByteSequence.AggregateByteSequence
          A naive ByteSequence that glues two ByteSequence instances together.
static class AbstractByteSequence.PartialByteSequence
          A naive ByteSequence that represents a portion of another ByteSequence.

 

Constructor Summary
AbstractByteSequence()
           

 

Method Summary
 boolean equals(java.lang.Object o)
          
 int hashCode()
          
 ByteSequence subSequence(int ofStart, int ofEnd)
          Returns a new ByteSequence that is a subsequence of this sequence.
 Binary toBinary()
          Returns a Binary object that holds the contents of this ByteSequence.
 java.lang.String toString()
          

 

Methods inherited from interface com.tangosol.util.ByteSequence
byteAt, length

 

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()

equals

public boolean equals(java.lang.Object o)

toString

public java.lang.String toString()

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.