com.bea.xml.stream
Class XMLStreamRecorder

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

public class XMLStreamRecorder
extends XMLWriterBase

Writes XML in a non-xml format to create XML tests.


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

Constructor Detail

XMLStreamRecorder

public XMLStreamRecorder()

XMLStreamRecorder

public XMLStreamRecorder(Writer writer)
Method Detail

writeName

protected String writeName(String prefix,
                           String namespaceURI,
                           String localName)
                    throws XMLStreamException
Overrides:
writeName in class XMLWriterBase
Throws:
XMLStreamException

writeType

protected void writeType(int type)
                  throws XMLStreamException
Throws:
XMLStreamException

openStartTag

protected void openStartTag()
                     throws XMLStreamException
Overrides:
openStartTag in class XMLWriterBase
Throws:
XMLStreamException

closeStartTag

protected void closeStartTag()
                      throws XMLStreamException
Overrides:
closeStartTag in class XMLWriterBase
Throws:
XMLStreamException

openEndTag

protected void openEndTag()
                   throws XMLStreamException
Overrides:
openEndTag in class XMLWriterBase
Throws:
XMLStreamException

closeEndTag

protected void closeEndTag()
                    throws XMLStreamException
Overrides:
closeEndTag in class XMLWriterBase
Throws:
XMLStreamException

writeAttribute

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

writeNamespace

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

writeDefaultNamespace

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

writeComment

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

writeProcessingInstruction

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

writeDTD

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

writeCData

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

writeEntityRef

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

writeStartDocument

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

writeStartDocument

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

writeStartDocument

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

writeCharactersInternal

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

write

public void write(XMLStreamReader xmlr)
           throws XMLStreamException
Overrides:
write in class ReaderToWriter
Throws:
XMLStreamException

main

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


Copyright © 2004 . All Rights Reserved.