com.ptc.windchill.upgrade.dust
Class ContentHandlerWriter
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.ptc.windchill.upgrade.dust.ContentHandlerWriter
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- public class ContentHandlerWriter
- extends DefaultHandler
Extention to DefaultHandler that passes SAX calls to a writer provided by TranformerFactory.
- See Also:
TransformerHandler
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
void |
flush()
|
private TransformerHandler |
getContentHandlerToWriteTo(File file,
String cdata_element)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
setResult(File file)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE
private static final String RESOURCE
outHandler
TransformerHandler outHandler
handler
TransformerHandler handler
streamResult
StreamResult streamResult
outputStream
BufferedOutputStream outputStream
ContentHandlerWriter
ContentHandlerWriter()
ContentHandlerWriter
ContentHandlerWriter(File outfile)
ContentHandlerWriter
ContentHandlerWriter(File outfile,
String cdata_element)
- ContentHandlerWriter constructor that allows an element to be set as having CDATA,
OutputKeys.CDATA_SECTION_ELEMENTS
getContentHandlerToWriteTo
private TransformerHandler getContentHandlerToWriteTo(File file,
String cdata_element)
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Throws:
SAXException
startElement
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Throws:
SAXException
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
- Throws:
SAXException
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
- Throws:
SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
- Throws:
SAXException
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
- Throws:
SAXException
skippedEntity
public void skippedEntity(String name)
throws SAXException
- Throws:
SAXException
startDocument
public void startDocument()
throws SAXException
- Throws:
SAXException
setResult
public void setResult(File file)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
flush
public void flush()