Class XMLSupport.StreamWriterDelegate

  • All Implemented Interfaces:
    java.lang.AutoCloseable, javax.xml.stream.XMLStreamWriter
    Enclosing class:
    XMLSupport

    public static class XMLSupport.StreamWriterDelegate
    extends java.lang.Object
    implements javax.xml.stream.XMLStreamWriter, java.lang.AutoCloseable
    The corollary to StreamReaderDelegate. This class is designed to sit between an XMLStreamWriter and an application's XMLStreamWriter. By default each method does nothing but call the corresponding method on the parent interface.
    • Field Detail

      • writer

        protected final javax.xml.stream.XMLStreamWriter writer
    • Constructor Detail

      • StreamWriterDelegate

        public StreamWriterDelegate​(javax.xml.stream.XMLStreamWriter writer)
    • Method Detail

      • getWriter

        public javax.xml.stream.XMLStreamWriter getWriter()
        Returns:
        the underlying writer being delegated to
      • close

        public void close()
                   throws javax.xml.stream.XMLStreamException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • flush

        public void flush()
                   throws javax.xml.stream.XMLStreamException
        Specified by:
        flush in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • getNamespaceContext

        public javax.xml.namespace.NamespaceContext getNamespaceContext()
        Specified by:
        getNamespaceContext in interface javax.xml.stream.XMLStreamWriter
      • getPrefix

        public java.lang.String getPrefix​(java.lang.String uri)
                                   throws javax.xml.stream.XMLStreamException
        Specified by:
        getPrefix in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
                                     throws java.lang.IllegalArgumentException
        Specified by:
        getProperty in interface javax.xml.stream.XMLStreamWriter
        Throws:
        java.lang.IllegalArgumentException
      • setDefaultNamespace

        public void setDefaultNamespace​(java.lang.String uri)
                                 throws javax.xml.stream.XMLStreamException
        Specified by:
        setDefaultNamespace in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • setNamespaceContext

        public void setNamespaceContext​(javax.xml.namespace.NamespaceContext context)
                                 throws javax.xml.stream.XMLStreamException
        Specified by:
        setNamespaceContext in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • setPrefix

        public void setPrefix​(java.lang.String prefix,
                              java.lang.String uri)
                       throws javax.xml.stream.XMLStreamException
        Specified by:
        setPrefix in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeAttribute

        public void writeAttribute​(java.lang.String localName,
                                   java.lang.String value)
                            throws javax.xml.stream.XMLStreamException
        Specified by:
        writeAttribute in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeAttribute

        public void writeAttribute​(java.lang.String namespaceURI,
                                   java.lang.String localName,
                                   java.lang.String value)
                            throws javax.xml.stream.XMLStreamException
        Specified by:
        writeAttribute in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeAttribute

        public void writeAttribute​(java.lang.String prefix,
                                   java.lang.String namespaceURI,
                                   java.lang.String localName,
                                   java.lang.String value)
                            throws javax.xml.stream.XMLStreamException
        Specified by:
        writeAttribute in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeCData

        public void writeCData​(java.lang.String data)
                        throws javax.xml.stream.XMLStreamException
        Specified by:
        writeCData in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeCharacters

        public void writeCharacters​(char[] text,
                                    int start,
                                    int len)
                             throws javax.xml.stream.XMLStreamException
        Specified by:
        writeCharacters in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeCharacters

        public void writeCharacters​(java.lang.String text)
                             throws javax.xml.stream.XMLStreamException
        Specified by:
        writeCharacters in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeComment

        public void writeComment​(java.lang.String data)
                          throws javax.xml.stream.XMLStreamException
        Specified by:
        writeComment in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeDefaultNamespace

        public void writeDefaultNamespace​(java.lang.String namespaceURI)
                                   throws javax.xml.stream.XMLStreamException
        Specified by:
        writeDefaultNamespace in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeDTD

        public void writeDTD​(java.lang.String dtd)
                      throws javax.xml.stream.XMLStreamException
        Specified by:
        writeDTD in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeEmptyElement

        public void writeEmptyElement​(java.lang.String localName)
                               throws javax.xml.stream.XMLStreamException
        Specified by:
        writeEmptyElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeEmptyElement

        public void writeEmptyElement​(java.lang.String namespaceURI,
                                      java.lang.String localName)
                               throws javax.xml.stream.XMLStreamException
        Specified by:
        writeEmptyElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeEmptyElement

        public void writeEmptyElement​(java.lang.String prefix,
                                      java.lang.String localName,
                                      java.lang.String namespaceURI)
                               throws javax.xml.stream.XMLStreamException
        Specified by:
        writeEmptyElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeEndDocument

        public void writeEndDocument()
                              throws javax.xml.stream.XMLStreamException
        Specified by:
        writeEndDocument in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeEndElement

        public void writeEndElement()
                             throws javax.xml.stream.XMLStreamException
        Specified by:
        writeEndElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeEntityRef

        public void writeEntityRef​(java.lang.String name)
                            throws javax.xml.stream.XMLStreamException
        Specified by:
        writeEntityRef in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeNamespace

        public void writeNamespace​(java.lang.String prefix,
                                   java.lang.String namespaceURI)
                            throws javax.xml.stream.XMLStreamException
        Specified by:
        writeNamespace in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeProcessingInstruction

        public void writeProcessingInstruction​(java.lang.String target)
                                        throws javax.xml.stream.XMLStreamException
        Specified by:
        writeProcessingInstruction in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeProcessingInstruction

        public void writeProcessingInstruction​(java.lang.String target,
                                               java.lang.String data)
                                        throws javax.xml.stream.XMLStreamException
        Specified by:
        writeProcessingInstruction in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeStartDocument

        public void writeStartDocument()
                                throws javax.xml.stream.XMLStreamException
        Specified by:
        writeStartDocument in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeStartDocument

        public void writeStartDocument​(java.lang.String version)
                                throws javax.xml.stream.XMLStreamException
        Specified by:
        writeStartDocument in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeStartDocument

        public void writeStartDocument​(java.lang.String encoding,
                                       java.lang.String version)
                                throws javax.xml.stream.XMLStreamException
        Specified by:
        writeStartDocument in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeStartElement

        public void writeStartElement​(java.lang.String localName)
                               throws javax.xml.stream.XMLStreamException
        Specified by:
        writeStartElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeStartElement

        public void writeStartElement​(java.lang.String namespaceURI,
                                      java.lang.String localName)
                               throws javax.xml.stream.XMLStreamException
        Specified by:
        writeStartElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException
      • writeStartElement

        public void writeStartElement​(java.lang.String prefix,
                                      java.lang.String localName,
                                      java.lang.String namespaceURI)
                               throws javax.xml.stream.XMLStreamException
        Specified by:
        writeStartElement in interface javax.xml.stream.XMLStreamWriter
        Throws:
        javax.xml.stream.XMLStreamException