Package com.ctc.wstx.sw
Class XmlWriterWrapper
- java.lang.Object
-
- java.io.Writer
-
- com.ctc.wstx.sw.XmlWriterWrapper
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public abstract class XmlWriterWrapper extends Writer
This is a simple wrapper class, which decorates anXmlWriter
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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XmlWriterWrapper(XmlWriter writer)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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(String str)
abstract void
write(String str, int off, int len)
-
-
-
Field Detail
-
mWriter
protected final XmlWriter mWriter
-
-
Constructor Detail
-
XmlWriterWrapper
protected XmlWriterWrapper(XmlWriter writer)
-
-
Method Detail
-
wrapWriteRaw
public static XmlWriterWrapper wrapWriteRaw(XmlWriter xw)
-
wrapWriteCharacters
public static XmlWriterWrapper wrapWriteCharacters(XmlWriter xw)
-
close
public final void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
flush
public final void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
write
public final void write(char[] cbuf) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public abstract void write(char[] cbuf, int off, int len) throws IOException
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
public final void write(int c) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public abstract void write(String str) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public abstract void write(String str, int off, int len) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
-