public final class ApplicationXmlIo extends AbstractDescriptorIo
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.
|
createDocumentBuilder, createDocumentBuilder, getEntityResolver, parseXml, parseXml, writeAll, writeDescriptor, writeDescriptor, writeDescriptor, writeDescriptor
public static ApplicationXml parseApplicationXmlFromFile(File file, EntityResolver entityResolver) throws IOException, org.jdom.JDOMException
file
- The file to parseentityResolver
- A SAX entity resolver, or null
to use the defaultIOException
- If an I/O error occursorg.jdom.JDOMException
- If the file could not be parsedpublic static ApplicationXml parseApplicationXml(InputStream input, EntityResolver entityResolver) throws IOException, org.jdom.JDOMException
input
- The input streamentityResolver
- A SAX entity resolver, or null
to use the defaultIOException
- If an I/O error occursorg.jdom.JDOMException
- If the input could not be parsedpublic 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.