|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cactus.integration.ant.deployment.WebXmlIo
Provides convenience methods for reading and writing web deployment descriptors.
Constructor Summary | |
WebXmlIo()
|
Method Summary | |
static WebXml |
newWebXml(WebXmlVersion theVersion)
Creates a new empty deployment descriptor. |
static WebXml |
parseWebXml(java.io.InputStream theInput,
org.xml.sax.EntityResolver theEntityResolver)
Parses a deployment descriptor provided as input stream. |
static WebXml |
parseWebXmlFromFile(java.io.File theFile,
org.xml.sax.EntityResolver theEntityResolver)
Parses a deployment descriptor stored in a regular file. |
static void |
writeWebXml(WebXml theWebXml,
java.io.File theFile)
Writes the specified document to a file. |
static void |
writeWebXml(WebXml theWebXml,
java.io.File theFile,
java.lang.String theEncoding)
Writes the specified document to a file. |
static void |
writeWebXml(WebXml theWebXml,
java.io.File theFile,
java.lang.String theEncoding,
boolean isIndent)
Writes the specified document to a file. |
static void |
writeWebXml(WebXml theWebXml,
java.io.OutputStream theOutput,
java.lang.String theEncoding,
boolean isIndent)
Writes the specified document to an output stream. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WebXmlIo()
Method Detail |
public static WebXml newWebXml(WebXmlVersion theVersion) throws javax.xml.parsers.ParserConfigurationException
theVersion
- The version of the descriptor to create
javax.xml.parsers.ParserConfigurationException
- If the XML parser was not correctly
configuredpublic static WebXml parseWebXmlFromFile(java.io.File theFile, org.xml.sax.EntityResolver theEntityResolver) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, java.io.IOException
theFile
- The file to parsetheEntityResolver
- A SAX entity resolver, or null
to
use the default
org.xml.sax.SAXException
- If the file could not be parsed
javax.xml.parsers.ParserConfigurationException
- If the XML parser was not correctly
configured
java.io.IOException
- If an I/O error occurspublic static WebXml parseWebXml(java.io.InputStream theInput, org.xml.sax.EntityResolver theEntityResolver) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, java.io.IOException
theInput
- The input streamtheEntityResolver
- A SAX entity resolver, or null
to
use the default
org.xml.sax.SAXException
- If the input could not be parsed
javax.xml.parsers.ParserConfigurationException
- If the XML parser was not correctly
configured
java.io.IOException
- If an I/O error occurspublic static void writeWebXml(WebXml theWebXml, java.io.File theFile) throws java.io.IOException
theWebXml
- The descriptor to serializetheFile
- The file to write to
java.io.IOException
- If an I/O error occurspublic static void writeWebXml(WebXml theWebXml, java.io.File theFile, java.lang.String theEncoding) throws java.io.IOException
theWebXml
- The descriptor to serializetheFile
- The file to write totheEncoding
- The character encoding to use
java.io.IOException
- If an I/O error occurspublic static void writeWebXml(WebXml theWebXml, java.io.File theFile, java.lang.String theEncoding, boolean isIndent) throws java.io.IOException
theWebXml
- The descriptor to serializetheFile
- The file to write totheEncoding
- The character encoding to useisIndent
- Whether the written XML should be indented
java.io.IOException
- If an I/O error occurspublic static void writeWebXml(WebXml theWebXml, java.io.OutputStream theOutput, java.lang.String theEncoding, boolean isIndent) throws java.io.IOException
theWebXml
- The descriptor to serializetheOutput
- The output stream to write totheEncoding
- The character encoding to useisIndent
- Whether the written XML should be indented
java.io.IOException
- If an I/O error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |