public final class Encoded
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
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(java.lang.String text) |
|
void |
setEscape(java.lang.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.
|
public void ensureSize(int size)
public final void set(java.lang.String text)
public final void setEscape(java.lang.String text, boolean isAttribute)
isAttribute
- if true, characters like \t, \r, and \n are also escaped.public final void write(UTF8XmlOutput out) throws java.io.IOException
java.io.IOException
public void append(char b)
public void compact()
Copyright © 2018 Oracle Corporation. All rights reserved.