com.bea.xml.stream
Class XMLWriterBase

java.lang.Object
  extended bycom.bea.xml.stream.ReaderToWriter
      extended bycom.bea.xml.stream.XMLWriterBase
All Implemented Interfaces:
XMLStreamWriter
Direct Known Subclasses:
XMLStreamRecorder

public class XMLWriterBase
extends ReaderToWriter
implements XMLStreamWriter

The base output class.


Field Summary
protected  NamespaceContextImpl context
           
protected static String DEFAULTNS
           
 
Constructor Summary
XMLWriterBase()
           
XMLWriterBase(Writer writer)
           
 
Method Summary
 void close()
           
protected  void closeEndTag()
           
protected  void closeStartElement()
           
protected  void closeStartTag()
           
 void flush()
           
 NamespaceContext getNamespaceContext()
           
 String getPrefix(String uri)
           
 Object getProperty(String name)
           
protected  String getURIInternal(String prefix)
           
protected  boolean isOpen()
           
static void main(String[] args)
           
protected  void openEndTag()
           
protected  void openStartTag()
           
 void setConfigurationContext(ConfigurationContextBase c)
           
 void setDefaultNamespace(String uri)
           
 void setNamespaceContext(NamespaceContext context)
           
 void setPrefix(String prefix, String uri)
           
 void setWriter(Writer writer)
           
protected  void write(char c)
           
protected  void write(char[] c)
           
protected  void write(char[] c, int start, int len)
           
protected  void write(String s)
           
 void writeAttribute(String localName, String value)
           
 void writeAttribute(String namespaceURI, String localName, String value)
           
 void writeAttribute(String prefix, String namespaceURI, String localName, String value)
           
 void writeCData(String data)
           
 void writeCharacters(char[] text, int start, int len)
           
 void writeCharacters(String text)
           
protected  void writeCharactersInternal(char[] characters, int start, int length, boolean isAttributeValue)
           
 void writeComment(String data)
           
 void writeDefaultNamespace(String namespaceURI)
           
 void writeDTD(String dtd)
           
 void writeEmptyElement(String localName)
           
 void writeEmptyElement(String namespaceURI, String localName)
           
 void writeEmptyElement(String prefix, String localName, String namespaceURI)
           
 void writeEndDocument()
           
 void writeEndElement()
           
 void writeEntityRef(String name)
           
protected  String writeName(String prefix, String namespaceURI, String localName)
           
 void writeNamespace(String prefix, String namespaceURI)
           
 void writeProcessingInstruction(String target)
           
 void writeProcessingInstruction(String target, String text)
           
 void writeRaw(String data)
           
 void writeStartDocument()
           
 void writeStartDocument(String version)
           
 void writeStartDocument(String encoding, String version)
           
 void writeStartElement(String localName)
           
 void writeStartElement(String namespaceURI, String localName)
           
 void writeStartElement(String prefix, String localName, String namespaceURI)
           
protected  void writeStartElementInternal(String namespaceURI, String localName)
           
 
Methods inherited from class com.bea.xml.stream.ReaderToWriter
setStreamWriter, write, writeAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTNS

protected static final String DEFAULTNS
See Also:
Constant Field Values

context

protected NamespaceContextImpl context
Constructor Detail

XMLWriterBase

public XMLWriterBase()

XMLWriterBase

public XMLWriterBase(Writer writer)
Method Detail

setWriter

public void setWriter(Writer writer)

setConfigurationContext

public void setConfigurationContext(ConfigurationContextBase c)

write

protected void write(String s)
              throws XMLStreamException
Throws:
XMLStreamException

write

protected void write(char c)
              throws XMLStreamException
Throws:
XMLStreamException

write

protected void write(char[] c)
              throws XMLStreamException
Throws:
XMLStreamException

write

protected void write(char[] c,
                     int start,
                     int len)
              throws XMLStreamException
Throws:
XMLStreamException

writeCharactersInternal

protected void writeCharactersInternal(char[] characters,
                                       int start,
                                       int length,
                                       boolean isAttributeValue)
                                throws XMLStreamException
Throws:
XMLStreamException

closeStartElement

protected void closeStartElement()
                          throws XMLStreamException
Throws:
XMLStreamException

isOpen

protected boolean isOpen()

closeStartTag

protected void closeStartTag()
                      throws XMLStreamException
Throws:
XMLStreamException

writeName

protected String writeName(String prefix,
                           String namespaceURI,
                           String localName)
                    throws XMLStreamException
Throws:
XMLStreamException

getURIInternal

protected String getURIInternal(String prefix)

openStartTag

protected void openStartTag()
                     throws XMLStreamException
Throws:
XMLStreamException

writeStartElementInternal

protected void writeStartElementInternal(String namespaceURI,
                                         String localName)
                                  throws XMLStreamException
Throws:
XMLStreamException

writeStartElement

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

writeStartElement

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

writeStartElement

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

writeEmptyElement

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

writeEmptyElement

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

writeEmptyElement

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

openEndTag

protected void openEndTag()
                   throws XMLStreamException
Throws:
XMLStreamException

closeEndTag

protected void closeEndTag()
                    throws XMLStreamException
Throws:
XMLStreamException

writeEndElement

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

writeRaw

public void writeRaw(String data)
              throws XMLStreamException
Throws:
XMLStreamException

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

writeEndDocument

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

writeAttribute

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

writeAttribute

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

writeAttribute

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

writeNamespace

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

writeDefaultNamespace

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

writeComment

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

writeProcessingInstruction

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

writeProcessingInstruction

public void writeProcessingInstruction(String target,
                                       String text)
                                throws XMLStreamException
Specified by:
writeProcessingInstruction in interface XMLStreamWriter
Throws:
XMLStreamException

writeDTD

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

writeCData

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

writeEntityRef

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

writeStartDocument

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

writeStartDocument

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

writeStartDocument

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

writeCharacters

public void writeCharacters(String text)
                     throws XMLStreamException
Specified by:
writeCharacters 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

getPrefix

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

setPrefix

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

setDefaultNamespace

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

setNamespaceContext

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

getNamespaceContext

public NamespaceContext getNamespaceContext()
Specified by:
getNamespaceContext in interface XMLStreamWriter

getProperty

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

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2004 . All Rights Reserved.