Package com.ctc.wstx.sw
Class XmlWriterWrapper
- java.lang.Object
-
- java.io.Writer
-
- com.ctc.wstx.sw.XmlWriterWrapper
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
- Direct Known Subclasses:
XmlWriterWrapper.RawWrapper,XmlWriterWrapper.TextWrapper
public abstract class XmlWriterWrapper extends java.io.WriterThis 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classXmlWriterWrapper.RawWrapperThis wrapper directs calls towriteRawmethods.private static classXmlWriterWrapper.TextWrapperThis wrapper directs calls towriteCharactersmethods.
-
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(java.lang.String str)abstract voidwrite(java.lang.String str, int off, int len)
-
-
-
Field Detail
-
mWriter
protected final XmlWriter mWriter
-
mBuffer
private char[] mBuffer
-
-
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 java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException
-
flush
public final void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException
-
write
public final void write(char[] cbuf) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public abstract void write(char[] cbuf, int off, int len) throws java.io.IOException- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public final void write(int c) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public abstract void write(java.lang.String str) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public abstract void write(java.lang.String str, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
-