abstract class CompositeByteArrayRelativeBase
extends java.lang.Object
CompositeByteArrayRelativeReader and
CompositeByteArrayRelativeWriter.| Modifier and Type | Field and Description |
|---|---|
protected CompositeByteArray |
cba
The underlying
CompositeByteArray. |
protected ByteArray.Cursor |
cursor
A cursor of the underlying
CompositeByteArray. |
| Constructor and Description |
|---|
CompositeByteArrayRelativeBase(CompositeByteArray cba)
Creates a new instance of CompositeByteArrayRelativeBase.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(ByteArray ba)
Make a
ByteArray available for access at the end of this object. |
protected abstract void |
cursorPassedFirstComponent()
Called whenever the cursor has passed from the
cba's
first component. |
void |
free()
Free all resources associated with this object.
|
int |
getIndex()
Get the index that will be used for the next access.
|
int |
getRemaining() |
boolean |
hasRemaining() |
int |
last()
Get the index after the last byte that can be accessed.
|
java.nio.ByteOrder |
order() |
protected final CompositeByteArray cba
CompositeByteArray.protected final ByteArray.Cursor cursor
CompositeByteArray. This
cursor is never moved directly; its position only changes through calls
to relative read or write methods.public CompositeByteArrayRelativeBase(CompositeByteArray cba)
cba - The CompositeByteArray that will be the base for this classpublic final int getRemaining()
public final boolean hasRemaining()
public java.nio.ByteOrder order()
public final void append(ByteArray ba)
ByteArray available for access at the end of this object.public final void free()
public final int getIndex()
public final int last()
protected abstract void cursorPassedFirstComponent()
cba's
first component. As the first component is no longer used, this provides
a good opportunity for subclasses to perform some action on it (such as
freeing it).