static class Encode.Buffer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.nio.CharBuffer |
_input
The input buffer.
|
(package private) java.nio.CharBuffer |
_output
The output buffer.
|
(package private) static int |
INPUT_BUFFER_SIZE
Input buffer size, used to extract a copy of the input
from a string and then send to the encoder.
|
(package private) static int |
OUTPUT_BUFFER_SIZE
Output buffer size used to store the encoded output before
wrapping in a string.
|
Constructor and Description |
---|
Buffer() |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
encode(Encoder encoder,
java.lang.String str,
int j)
The core String encoding routine of this class.
|
(package private) void |
encode(Encoder encoder,
java.io.Writer out,
java.lang.String str,
int j)
The core Writer encoding routing of this class.
|
static final int INPUT_BUFFER_SIZE
static final int OUTPUT_BUFFER_SIZE
final java.nio.CharBuffer _input
final java.nio.CharBuffer _output
java.lang.String encode(Encoder encoder, java.lang.String str, int j)
encoder
- the encoder to usestr
- the string to encodej
- the offset in str
to start encodingvoid encode(Encoder encoder, java.io.Writer out, java.lang.String str, int j) throws java.io.IOException
encoder
- the encoder to useout
- where to write the encoded outputstr
- the string to encodej
- the position in the string at which the first character
needs encoding.java.io.IOException
- if thrown by the writer.