com.caucho.xml.stream
Class XMLStreamWriterImpl

java.lang.Object
  extended by com.caucho.xml.stream.XMLStreamWriterImpl
All Implemented Interfaces:
XMLStreamWriter
Direct Known Subclasses:
XmppStreamWriterImpl

public class XMLStreamWriterImpl
extends java.lang.Object
implements XMLStreamWriter


Constructor Summary
XMLStreamWriterImpl(java.io.OutputStream os, boolean repair)
           
XMLStreamWriterImpl(java.io.Writer w, boolean repair)
           
XMLStreamWriterImpl(WriteStream ws)
           
XMLStreamWriterImpl(WriteStream ws, boolean repair)
           
 
Method Summary
 void close()
           
 void flush()
           
 javax.xml.namespace.NamespaceContext getNamespaceContext()
           
 java.lang.String getPrefix(java.lang.String uri)
           
 java.lang.Object getProperty(java.lang.String name)
           
 void setDefaultNamespace(java.lang.String uri)
           
 void setIndent(int indent)
           
 void setNamespaceContext(javax.xml.namespace.NamespaceContext context)
           
 void setPrefix(java.lang.String prefix, java.lang.String uri)
           
 void setRepair(boolean repair)
           
 void writeAttribute(java.lang.String localName, java.lang.String value)
           
 void writeAttribute(java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
           
 void writeAttribute(java.lang.String prefix, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
           
 void writeCData(java.lang.String data)
           
 void writeCharacters(char[] text, int start, int len)
           
 void writeCharacters(java.lang.String text)
           
 void writeComment(java.lang.String data)
           
 void writeDefaultNamespace(java.lang.String namespaceURI)
           
 void writeDTD(java.lang.String dtd)
           
 void writeElement(java.lang.String localName, java.lang.String contents)
           
 void writeEmptyElement(java.lang.String localName)
           
 void writeEmptyElement(java.lang.String namespaceURI, java.lang.String localName)
           
 void writeEmptyElement(java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)
           
 void writeEndDocument()
           
 void writeEndElement()
           
 void writeEndElement(java.lang.String localName)
           
 void writeEndElement(java.lang.String namespaceURI, java.lang.String localName)
           
 void writeEntityRef(java.lang.String name)
           
 void writeNamespace(java.lang.String prefix, java.lang.String namespaceURI)
           
 void writeProcessingInstruction(java.lang.String target)
           
 void writeProcessingInstruction(java.lang.String target, java.lang.String data)
           
 void writeStartDocument()
           
 void writeStartDocument(java.lang.String version)
           
 void writeStartDocument(java.lang.String encoding, java.lang.String version)
           
 void writeStartElement(java.lang.String localName)
           
 void writeStartElement(java.lang.String namespaceURI, java.lang.String localName)
           
 void writeStartElement(java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLStreamWriterImpl

public XMLStreamWriterImpl(WriteStream ws)

XMLStreamWriterImpl

public XMLStreamWriterImpl(WriteStream ws,
                           boolean repair)

XMLStreamWriterImpl

public XMLStreamWriterImpl(java.io.Writer w,
                           boolean repair)

XMLStreamWriterImpl

public XMLStreamWriterImpl(java.io.OutputStream os,
                           boolean repair)
Method Detail

setIndent

public void setIndent(int indent)

setRepair

public void setRepair(boolean repair)

close

public void close()
           throws XMLStreamException
Specified by:
close in interface XMLStreamWriter
Throws:
XMLStreamException

flush

public void flush()
           throws XMLStreamException
Specified by:
flush in interface XMLStreamWriter
Throws:
XMLStreamException

getNamespaceContext

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

getPrefix

public java.lang.String getPrefix(java.lang.String uri)
                           throws XMLStreamException
Specified by:
getPrefix in interface XMLStreamWriter
Throws:
XMLStreamException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws java.lang.IllegalArgumentException
Specified by:
getProperty in interface XMLStreamWriter
Throws:
java.lang.IllegalArgumentException

setDefaultNamespace

public void setDefaultNamespace(java.lang.String uri)
                         throws XMLStreamException
Specified by:
setDefaultNamespace in interface XMLStreamWriter
Throws:
XMLStreamException

setNamespaceContext

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

setPrefix

public void setPrefix(java.lang.String prefix,
                      java.lang.String uri)
               throws XMLStreamException
Specified by:
setPrefix in interface XMLStreamWriter
Throws:
XMLStreamException

writeAttribute

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

writeAttribute

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

writeAttribute

public void writeAttribute(java.lang.String prefix,
                           java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String value)
                    throws XMLStreamException
Specified by:
writeAttribute in interface XMLStreamWriter
Throws:
XMLStreamException

writeCData

public void writeCData(java.lang.String data)
                throws XMLStreamException
Specified by:
writeCData in interface XMLStreamWriter
Throws:
XMLStreamException

writeCharacters

public void writeCharacters(char[] text,
                            int start,
                            int len)
                     throws XMLStreamException
Specified by:
writeCharacters in interface XMLStreamWriter
Throws:
XMLStreamException

writeCharacters

public void writeCharacters(java.lang.String text)
                     throws XMLStreamException
Specified by:
writeCharacters in interface XMLStreamWriter
Throws:
XMLStreamException

writeComment

public void writeComment(java.lang.String data)
                  throws XMLStreamException
Specified by:
writeComment in interface XMLStreamWriter
Throws:
XMLStreamException

writeDefaultNamespace

public void writeDefaultNamespace(java.lang.String namespaceURI)
                           throws XMLStreamException
Specified by:
writeDefaultNamespace in interface XMLStreamWriter
Throws:
XMLStreamException

writeDTD

public void writeDTD(java.lang.String dtd)
              throws XMLStreamException
Specified by:
writeDTD in interface XMLStreamWriter
Throws:
XMLStreamException

writeElement

public void writeElement(java.lang.String localName,
                         java.lang.String contents)
                  throws XMLStreamException
Throws:
XMLStreamException

writeEmptyElement

public void writeEmptyElement(java.lang.String localName)
                       throws XMLStreamException
Specified by:
writeEmptyElement in interface XMLStreamWriter
Throws:
XMLStreamException

writeEmptyElement

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

writeEmptyElement

public void writeEmptyElement(java.lang.String prefix,
                              java.lang.String localName,
                              java.lang.String namespaceURI)
                       throws XMLStreamException
Specified by:
writeEmptyElement in interface XMLStreamWriter
Throws:
XMLStreamException

writeEndDocument

public void writeEndDocument()
                      throws XMLStreamException
Specified by:
writeEndDocument in interface XMLStreamWriter
Throws:
XMLStreamException

writeEndElement

public void writeEndElement()
                     throws XMLStreamException
Specified by:
writeEndElement in interface XMLStreamWriter
Throws:
XMLStreamException

writeEndElement

public void writeEndElement(java.lang.String localName)
                     throws XMLStreamException
Throws:
XMLStreamException

writeEndElement

public void writeEndElement(java.lang.String namespaceURI,
                            java.lang.String localName)
                     throws XMLStreamException
Throws:
XMLStreamException

writeEntityRef

public void writeEntityRef(java.lang.String name)
                    throws XMLStreamException
Specified by:
writeEntityRef in interface XMLStreamWriter
Throws:
XMLStreamException

writeNamespace

public void writeNamespace(java.lang.String prefix,
                           java.lang.String namespaceURI)
                    throws XMLStreamException
Specified by:
writeNamespace in interface XMLStreamWriter
Throws:
XMLStreamException

writeProcessingInstruction

public void writeProcessingInstruction(java.lang.String target)
                                throws XMLStreamException
Specified by:
writeProcessingInstruction in interface XMLStreamWriter
Throws:
XMLStreamException

writeProcessingInstruction

public void writeProcessingInstruction(java.lang.String target,
                                       java.lang.String data)
                                throws XMLStreamException
Specified by:
writeProcessingInstruction in interface XMLStreamWriter
Throws:
XMLStreamException

writeStartDocument

public void writeStartDocument()
                        throws XMLStreamException
Specified by:
writeStartDocument in interface XMLStreamWriter
Throws:
XMLStreamException

writeStartDocument

public void writeStartDocument(java.lang.String version)
                        throws XMLStreamException
Specified by:
writeStartDocument in interface XMLStreamWriter
Throws:
XMLStreamException

writeStartDocument

public void writeStartDocument(java.lang.String encoding,
                               java.lang.String version)
                        throws XMLStreamException
Specified by:
writeStartDocument in interface XMLStreamWriter
Throws:
XMLStreamException

writeStartElement

public void writeStartElement(java.lang.String localName)
                       throws XMLStreamException
Specified by:
writeStartElement in interface XMLStreamWriter
Throws:
XMLStreamException

writeStartElement

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

writeStartElement

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