|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.output.Encoded
public final class Encoded
Buffer for UTF-8 encoded string. See http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 for the UTF-8 encoding.
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public byte[] buf
public int len
Constructor Detail |
---|
public Encoded()
public Encoded(String text)
Method Detail |
---|
public void ensureSize(int size)
public final void set(String text)
public final void setEscape(String text, boolean isAttribute)
isAttribute
- if true, characters like \t, \r, and \n are also escaped.public final void write(UTF8XmlOutput out) throws IOException
IOException
public void append(char b)
public void compact()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |