Class ByteArrayView

java.lang.Object
com.streambase.sb.ByteArrayView
All Implemented Interfaces:
com.streambase.sb.internal.CloneableData, Serializable, Cloneable, Comparable<ByteArrayView>

public abstract class ByteArrayView extends Object implements Serializable, Comparable<ByteArrayView>, Cloneable, com.streambase.sb.internal.CloneableData
This class represents a StreamBase blob. Please read the following class documentation and method javadoc carefully as care must be taken when manipulating blobs represented by a ByteArrayView in a running application.

ByteArrayView provides an immutable window onto a byte[] or a part of one, specified with an offset and length. It provides convenience routines to create new windows on the current view as either ByteArrayViews or ByteBuffers.

Only the copy() methods copy the underlying data, so changes in the parent byte[] will be reflected in the view's results

Note: The ByteArrayView and its underlying Blob object should not be modified in-place by a StreamBase application. Modifying a Blob may introduce race conditions. If you do need to modify a Blob's data, create a new Blob or ByteArrayView object to receive the result. Use copy methods such as copyBytes(), and create a new ByteArrayView with makeView(byte[]) and return it when needed.

Note: Serializations of instances of this class that are created (e.g., by using ObjectOutputStream) in one version of StreamBase in general will not be deserializable in any other version of StreamBase.

See Also: