Class 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.Writer
    This is a simple wrapper class, which decorates an 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.
    • Field Detail

      • mBuffer

        private char[] mBuffer
    • Constructor Detail

      • XmlWriterWrapper

        protected XmlWriterWrapper​(XmlWriter writer)
    • Method Detail

      • close

        public final void close()
                         throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Writer
        Throws:
        java.io.IOException
      • flush

        public final void flush()
                         throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public final void write​(char[] cbuf)
                         throws java.io.IOException
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public abstract void write​(char[] cbuf,
                                   int off,
                                   int len)
                            throws java.io.IOException
        Specified by:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public final void write​(int c)
                         throws java.io.IOException
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public abstract void write​(java.lang.String str)
                            throws java.io.IOException
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException
      • write

        public abstract void write​(java.lang.String str,
                                   int off,
                                   int len)
                            throws java.io.IOException
        Overrides:
        write in class java.io.Writer
        Throws:
        java.io.IOException