|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DetectorStreamBuffer
This is the interface for a buffer of bytes from a stream. It allows to consume such bytes in order to detect metadata or even manipulate the stream.
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface net.sf.mmm.util.io.api.ComposedByteBuffer |
|---|
fill, getByteArray, getByteArrayCount |
| Methods inherited from interface net.sf.mmm.util.io.api.ByteIterator |
|---|
hasNext, next, peek |
| Methods inherited from interface net.sf.mmm.util.io.api.ByteProvider |
|---|
getBytesAvailable |
| Method Detail |
|---|
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 ByteIteratorbyteCount - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||