public interface DetectorStreamBuffer extends ComposedByteBuffer
Modifier and Type | Method and Description |
---|---|
long |
getStreamPosition()
This method gets the absolute position of the current pointer in the logical stream (the data provided by this
interface that origins from the previous member of the chain).
|
void |
insert(byte... data)
This method inserts the given bytes at the current position into the stream.
|
void |
insert(ByteArray data)
This method inserts the given
data at the current position into the stream. |
void |
remove(long byteCount)
This method removes the number of bytes given by
byteCount from the stream starting at the current
position. |
long |
skip()
This method skips all bytes
available in this buffer. |
long |
skip(long byteCount)
This method skips the number of bytes given by
byteCount in the stream starting at the current position. |
fill, getByteArray, getByteArrayCount
hasNext, next, peek
getBytesAvailable
void remove(long byteCount)
byteCount
from the stream starting at the current
position.byteCount
- is the number of bytes to remove. This value can be greater than the currently
available bytes
. You may supply Long.MAX_VALUE
to remove the rest of
the stream.skip(long)
long skip(long byteCount)
byteCount
in the stream starting at the current position.
The given number of bytes will be untouched in stream (queued for the next processor
in the chain).skip
in interface ByteIterator
byteCount
- is the number of bytes to ignore. This value can be greater than the currently
available bytes
. You may supply Long.MAX_VALUE
to ignore to the end of
the stream.byteCount
.InputStream.skip(long)
long skip()
available
in this buffer. This is logically the same as
skip
(ByteProvider.getBytesAvailable()
)
but more efficient.void insert(byte... data)
insert(ByteArray)
.data
- is a ByteArray
with the data to insert.void insert(ByteArray data)
data
at the current position into the stream.data
- is a ByteArray
with the data to insert.long getStreamPosition()
inserted
.Copyright © 2001–2016 mmm-Team. All rights reserved.