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 anXmlWriterto 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 protectedXmlWriterWrapper(XmlWriter writer)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()static XmlWriterWrapperwrapWriteCharacters(XmlWriter xw)static XmlWriterWrapperwrapWriteRaw(XmlWriter xw)voidwrite(char[] cbuf)abstract voidwrite(char[] cbuf, int off, int len)voidwrite(int c)abstract voidwrite(String str)abstract voidwrite(String str, int off, int len)-
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
-
-
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
public final void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
write
public final void write(char[] cbuf) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public abstract void write(char[] cbuf, int off, int len) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
write
public final void write(int c) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public abstract void write(String str) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
write
public abstract void write(String str, int off, int len) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
-