public abstract class XmlWriterWrapper
extends java.io.Writer
XmlWriter
to look like a Writer. This is necessary to implement a (legacy)
character quoting system introduced for Woodstox 2.0, which relies
on having a Writer to use for outputting.| Modifier and Type | Class and Description |
|---|---|
private static class |
XmlWriterWrapper.RawWrapper
This wrapper directs calls to
writeRaw methods. |
private static class |
XmlWriterWrapper.TextWrapper
This wrapper directs calls to
writeCharacters methods. |
| Modifier and Type | Field and Description |
|---|---|
private char[] |
mBuffer |
protected XmlWriter |
mWriter |
| Modifier | Constructor and Description |
|---|---|
protected |
XmlWriterWrapper(XmlWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
static XmlWriterWrapper |
wrapWriteCharacters(XmlWriter xw) |
static XmlWriterWrapper |
wrapWriteRaw(XmlWriter xw) |
void |
write(char[] cbuf) |
abstract void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
abstract void |
write(java.lang.String str) |
abstract void |
write(java.lang.String str,
int off,
int len) |
protected final XmlWriter mWriter
private char[] mBuffer
protected XmlWriterWrapper(XmlWriter writer)
public static XmlWriterWrapper wrapWriteRaw(XmlWriter xw)
public static XmlWriterWrapper wrapWriteCharacters(XmlWriter xw)
public final void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Writerjava.io.IOExceptionpublic final void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOExceptionpublic final void write(char[] cbuf)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic abstract void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic final void write(int c)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic abstract void write(java.lang.String str)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic abstract void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOException