public abstract class AbstractByteArray extends Object implements ByteArray
ByteArray
interface.Constructor and Description |
---|
AbstractByteArray() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkSubArray(int minimum,
int maximum)
|
ByteArray |
createSubArray(int minimum,
int maximum)
|
int |
getBytesAvailable()
This method gets the number of bytes available in this array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBytes, getCurrentIndex, getMaximumIndex, getMinimumIndex
protected void checkSubArray(int minimum, int maximum)
minimum
- is the new minimumIndex
.maximum
- is the new maximumIndex
.public ByteArray createSubArray(int minimum, int maximum)
ByteArray
with the same bytes
but the given
indices. minimum
and maximum
index are
both equal to the current indices of this ByteArray
this method may return the instance itself (
this
) rather than creating a new one.createSubArray
in interface ByteArray
minimum
- is the minimumIndex
and the currentIndex
for the new ByteArray
. It has to be greater or equal to the
minimumIndex
of this
ByteArray
.maximum
- is the maximumIndex
for the new ByteArray
.ByteArray
with the given indices.public int getBytesAvailable()
ByteArray.getMaximumIndex()
- ByteArray.getCurrentIndex()
+ 1
.getBytesAvailable
in interface ByteArray
getBytesAvailable
in interface ByteProvider
Copyright © 2001–2014 mmm-Team. All rights reserved.