public final class ApplicationXmlIo extends Object
| Modifier and Type | Method and Description |
|---|---|
static ApplicationXml |
parseApplicationXml(InputStream input,
EntityResolver entityResolver)
Parses a deployment descriptor provided as input stream.
|
static ApplicationXml |
parseApplicationXmlFromFile(File file,
EntityResolver entityResolver)
Parses a deployment descriptor stored in a regular file.
|
static void |
writeApplicationXml(ApplicationXml appXml,
File file)
Writes the specified document to a file.
|
static void |
writeApplicationXml(ApplicationXml appXml,
File file,
String encoding)
Writes the specified document to a file.
|
static void |
writeApplicationXml(ApplicationXml appXml,
File file,
String encoding,
boolean isIndent)
Writes the specified document to a file.
|
static void |
writeApplicationXml(ApplicationXml appXml,
OutputStream output,
String encoding,
boolean isIndent)
Writes the specified document to an output stream.
|
public static ApplicationXml parseApplicationXmlFromFile(File file, EntityResolver entityResolver) throws SAXException, ParserConfigurationException, IOException
file - The file to parseentityResolver - A SAX entity resolver, or null to use the defaultSAXException - If the file could not be parsedParserConfigurationException - If the XML parser was not correctly configuredIOException - If an I/O error occurspublic static ApplicationXml parseApplicationXml(InputStream input, EntityResolver entityResolver) throws SAXException, ParserConfigurationException, IOException
input - The input streamentityResolver - A SAX entity resolver, or null to use the defaultSAXException - If the input could not be parsedParserConfigurationException - If the XML parser was not correctly configuredIOException - If an I/O error occurspublic static void writeApplicationXml(ApplicationXml appXml, File file) throws IOException
appXml - The descriptor to serializefile - The file to write toIOException - If an I/O error occurspublic static void writeApplicationXml(ApplicationXml appXml, File file, String encoding) throws IOException
appXml - The descriptor to serializefile - The file to write toencoding - The character encoding to useIOException - If an I/O error occurspublic static void writeApplicationXml(ApplicationXml appXml, File file, String encoding, boolean isIndent) throws IOException
appXml - The descriptor to serializefile - The file to write toencoding - The character encoding to useisIndent - Whether the written XML should be indentedIOException - If an I/O error occurspublic static void writeApplicationXml(ApplicationXml appXml, OutputStream output, String encoding, boolean isIndent) throws IOException
appXml - The descriptor to serializeoutput - The output stream to write toencoding - The character encoding to useisIndent - Whether the written XML should be indentedIOException - If an I/O error occursCopyright © 2004-2013 Codehaus. All Rights Reserved.