class CDATAEncoder extends Encoder
Modifier and Type | Field and Description |
---|---|
private static char[] |
CDATA_END_ENCODED
The encoding of @{code "]]>"}.
|
private static int |
CDATA_END_ENCODED_LENGTH
Length of
"]]]]><![CDATA[>" . |
private static int |
CDATA_END_LENGTH
Length of
"]]>" . |
Constructor and Description |
---|
CDATAEncoder() |
Modifier and Type | Method and Description |
---|---|
protected java.nio.charset.CoderResult |
encodeArrays(java.nio.CharBuffer input,
java.nio.CharBuffer output,
boolean endOfInput)
The core encoding loop used when both the input and output buffers
are array backed.
|
protected int |
firstEncodedOffset(java.lang.String input,
int off,
int len)
Scans the input string for the first character index that requires
encoding.
|
protected int |
maxEncodedLength(int n)
Returns the maximum encoded length (in chars) of an input sequence of
n characters. |
java.lang.String |
toString() |
encode, encodeBuffers, overflow, underflow
private static final char[] CDATA_END_ENCODED
private static final int CDATA_END_ENCODED_LENGTH
"]]]]><![CDATA[>"
.private static final int CDATA_END_LENGTH
"]]>"
.protected int maxEncodedLength(int n)
Encoder
n
characters.maxEncodedLength
in class Encoder
n
- the number of characters of inputprotected int firstEncodedOffset(java.lang.String input, int off, int len)
Encoder
firstEncodedOffset
in class Encoder
input
- the input to check for encodingoff
- the offset of the first character to checklen
- the number of characters to checkoff+len
if no characters in the input require encoding.protected java.nio.charset.CoderResult encodeArrays(java.nio.CharBuffer input, java.nio.CharBuffer output, boolean endOfInput)
Encoder
encodeArrays
in class Encoder
input
- the input buffer.output
- the output buffer.endOfInput
- when true, this is the last input to encodepublic java.lang.String toString()
toString
in class java.lang.Object