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.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
java.io.IOException
public final void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
public final void write(char[] cbuf) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public abstract void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public final void write(int c) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public abstract void write(java.lang.String str) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public abstract void write(java.lang.String str, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException