com.sun.xml.bind.v2.runtime.output
public final class Encoded extends Object
Field Summary | |
---|---|
byte[] | buf |
int | len |
Constructor Summary | |
---|---|
Encoded() | |
Encoded(String text) |
Method Summary | |
---|---|
void | append(char b)
Appends a new character to the end of the buffer.
|
void | compact()
Reallocate the buffer to the exact size of the data
to reduce the memory footprint. |
void | ensureSize(int size) |
void | set(String text) |
void | setEscape(String text, boolean isAttribute)
Fill in the buffer by encoding the specified characters
while escaping characters like <
|
void | write(UTF8XmlOutput out)
Writes the encoded bytes to the given output stream. |
Parameters: isAttribute if true, characters like \t, \r, and \n are also escaped.