|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.io.base.AbstractByteArray
net.sf.mmm.util.io.impl.DetectorStreamBufferImpl.CurrentByteArray
protected class DetectorStreamBufferImpl.CurrentByteArray
This inner class is a view on the current ByteArray.
DetectorStreamBufferImpl.getByteArray(int)| Constructor Summary | |
|---|---|
protected |
DetectorStreamBufferImpl.CurrentByteArray()
|
| Method Summary | |
|---|---|
byte[] |
getBytes()
This method gets the underlying byte-array of this buffer. |
int |
getBytesAvailable()
This method gets the number of bytes available in this array. |
int |
getCurrentIndex()
This method gets the offset in the byte array. |
int |
getMaximumIndex()
This method gets the maximum index in the buffer. |
int |
getMinimumIndex()
This method gets the minimum index where to start reading in the byte array. |
| Methods inherited from class net.sf.mmm.util.io.base.AbstractByteArray |
|---|
checkSubArray, createSubArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DetectorStreamBufferImpl.CurrentByteArray()
| Method Detail |
|---|
public byte[] getBytes()
minimumIndex
(typically currentIndex to
maximumIndex. Only the creator of this object
may modify this array.
ByteArray.getCurrentIndex(),
ByteArray.getMaximumIndex()public int getBytesAvailable()
ByteArray.getMaximumIndex() - ByteArray.getCurrentIndex() + 1.
getBytesAvailable in interface ByteArraygetBytesAvailable in interface ByteProvidergetBytesAvailable in class AbstractByteArraypublic int getMinimumIndex()
byte array. It will be in the range from 0
to maximumIndex + 1. This is typically
the same as the current index. However a
mutable variant of a
ByteArray may allow to modify (increase) the
current-index. The value returned by this method
can NOT be modified.
public int getCurrentIndex()
byte array. It will
be in the range from 0 to
maximumIndex + 1.
byte array.public int getMaximumIndex()
buffer. It
will be in the range from -1 to
ByteArray.getBytes().length - 1.-1) indicates that the buffer does NOT contain data (payload).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||