|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.io.impl.BufferInputStream.CopyProcessor
protected static class BufferInputStream.CopyProcessor
This inner class is the ByteProcessor used to copy bytes from the
buffer to the caller consuming data from this stream.
| Field Summary | |
|---|---|
private byte[] |
targetBuffer
The buffer to copy to. |
private int |
targetOffset
The offset in targetBuffer. |
| Constructor Summary | |
|---|---|
BufferInputStream.CopyProcessor()
The constructor. |
|
BufferInputStream.CopyProcessor(byte[] targetBuffer,
int targetOffset)
The constructor. |
|
| Method Summary | |
|---|---|
int |
process(byte[] buffer,
int offset,
int length)
This method is called to process the number of length bytes
from the given buffer starting from the given
offset. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private byte[] targetBuffer
private int targetOffset
targetBuffer.
| Constructor Detail |
|---|
public BufferInputStream.CopyProcessor()
public BufferInputStream.CopyProcessor(byte[] targetBuffer,
int targetOffset)
targetBuffer - the buffer to copy to.targetOffset - the offset in targetBuffer.| Method Detail |
|---|
public int process(byte[] buffer,
int offset,
int length)
length bytes
from the given buffer starting from the given
offset.buffer. It is NOT permitted to modify the given
buffer unless this is explicitly specified by the calling
object (typically an implementation of ByteProcessable).
process in interface ByteProcessorbuffer - contains the bytes to process.offset - is the index where to start in the buffer.length - is the number of bytes to proceed.
length. However you can also return a
value less than length and greater or equal to zero, in order to
stop processing at a specific position.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||