protected static class EncodingUtilImpl.AsciiProcessor extends Object implements ByteProcessor
InputStream
in ASCII mode. It is
used as long as no other encoding has been detected.Modifier and Type | Field and Description |
---|---|
private char[] |
charBuffer
The character-buffer to fill by the reader.
|
private int |
charOffset
The current index in
charBuffer . |
Constructor and Description |
---|
AsciiProcessor()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
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 . |
private char[] charBuffer
private int charOffset
charBuffer
.public int process(byte[] buffer, int offset, int length)
ByteProcessor
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 ByteProcessor
buffer
- 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.Copyright © 2001–2016 mmm-Team. All rights reserved.