public class XmlWriter extends java.lang.Object implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.Character,java.lang.String> |
encoding
The output writer to save the values to.
|
protected java.io.PrintWriter |
out |
| Constructor and Description |
|---|
XmlWriter(java.io.PrintWriter out) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static java.lang.String |
encode(java.lang.String unencoded) |
static java.lang.String |
encode(java.lang.String unencoded,
boolean keepApos)
Encode the given string in XML1.0 format.
|
void |
flush()
Flushes the stream.
|
protected final java.io.PrintWriter out
private static final java.util.Map<java.lang.Character,java.lang.String> encoding
public XmlWriter(java.io.PrintWriter out)
public void flush()
public static java.lang.String encode(java.lang.String unencoded)
public static java.lang.String encode(java.lang.String unencoded, boolean keepApos)
unencoded - the unencoded input stringkeepApos - true if apostrophe sign should stay as it is (in order to work around
a Java bug that renders
new JLabel("<html>'</html>")
literally as 6 character string, see #7558)public void close() throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException