pt.tumba.parser.swf
Class XMLWriter

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by pt.tumba.parser.swf.SaxHandlerBase
          extended by pt.tumba.parser.swf.XMLWriter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class XMLWriter
extends SaxHandlerBase

Write XML text to an output stream

Author:
unknown

Nested Class Summary
 
Nested classes/interfaces inherited from class pt.tumba.parser.swf.SaxHandlerBase
SaxHandlerBase.ContentElementType, SaxHandlerBase.ElementType, SaxHandlerBase.GatheringElementType
 
Field Summary
protected  java.io.Writer out
          Description of the Field
protected  boolean started
          Description of the Field
 
Fields inherited from class pt.tumba.parser.swf.SaxHandlerBase
elementTypes, elems, elemType, gatherBuffer, gatheringElement, gatherMode
 
Constructor Summary
XMLWriter(java.io.OutputStream outstream)
          Constructor for the XMLWriter object
XMLWriter(java.io.PrintWriter writer)
          Constructor for the XMLWriter object
 
Method Summary
 void characters(char[] ch, int start, int length)
          Description of the Method
protected  void completeElement()
          Description of the Method
 void endDocument()
          Description of the Method
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Description of the Method
static java.lang.String normalize(char[] chars, int start, int length)
          Description of the Method
 void processingInstruction(java.lang.String target, java.lang.String data)
          Description of the Method
 void startDocument()
          Description of the Method
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Description of the Method
 
Methods inherited from class pt.tumba.parser.swf.SaxHandlerBase
dispatchAllMatchingGatheredElements, dispatchGatheredElement, endGatherMode, getAttr, getAttrBool, getAttrDouble, getAttrInt, startGatherMode
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.Writer out
Description of the Field


started

protected boolean started
Description of the Field

Constructor Detail

XMLWriter

public XMLWriter(java.io.OutputStream outstream)
Constructor for the XMLWriter object

Parameters:
outstream - Description of the Parameter

XMLWriter

public XMLWriter(java.io.PrintWriter writer)
Constructor for the XMLWriter object

Parameters:
writer - Description of the Parameter
Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Description of the Method

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Description of the Exception

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Description of the Method

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Description of the Exception

completeElement

protected void completeElement()
                        throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

normalize

public static java.lang.String normalize(char[] chars,
                                         int start,
                                         int length)
Description of the Method

Parameters:
chars - Description of the Parameter
start - Description of the Parameter
length - Description of the Parameter
Returns:
Description of the Return Value

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Description of the Method

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class SaxHandlerBase
Parameters:
namespaceURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
atts - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Description of the Method

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class SaxHandlerBase
Parameters:
namespaceURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Description of the Method

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class SaxHandlerBase
Parameters:
ch - Description of the Parameter
start - Description of the Parameter
length - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Description of the Method

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Overrides:
processingInstruction in class org.xml.sax.helpers.DefaultHandler
Parameters:
target - Description of the Parameter
data - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception