Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cactus.integration.ant.deployment.application
Class ApplicationXmlIo

    java.lang.Object
      org.apache.cactus.integration.ant.deployment.application.ApplicationXmlIo

public class ApplicationXmlIo
extends java.lang.Object

Provides convenience methods for reading and writing enterprise application deployment descriptors (application.xml).

Since:
  Cactus 1.5
Version:
  $Id: ApplicationXmlIo.java 239141 2005-02-15 10:31:44Z vmassol $

Constructor Summary
`ApplicationXmlIo()`

Method Summary
`static ApplicationXml` | `parseApplicationXml(java.io.InputStream theInput, org.xml.sax.EntityResolver theEntityResolver)` Parses a deployment descriptor provided as input stream.
`static ApplicationXml` | `parseApplicationXmlFromFile(java.io.File theFile, org.xml.sax.EntityResolver theEntityResolver)` Parses a deployment descriptor stored in a regular file.
`static void` | `writeApplicationXml(ApplicationXml theAppXml, java.io.File theFile)` Writes the specified document to a file.
`static void` | `writeApplicationXml(ApplicationXml theAppXml, java.io.File theFile, java.lang.String theEncoding)` Writes the specified document to a file.
`static void` | `writeApplicationXml(ApplicationXml theAppXml, java.io.File theFile, java.lang.String theEncoding, boolean isIndent)` Writes the specified document to a file.
`static void` | `writeApplicationXml(ApplicationXml theAppXml, 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

### ApplicationXmlIo

    public ApplicationXmlIo()

Method Detail

### parseApplicationXmlFromFile

    public static ApplicationXml parseApplicationXmlFromFile(java.io.File theFile,
                                                             org.xml.sax.EntityResolver theEntityResolver)
                                                      throws org.xml.sax.SAXException,
                                                             javax.xml.parsers.ParserConfigurationException,
                                                             java.io.IOException

  Parses a deployment descriptor stored in a regular file.

  Parameters:
    `theFile` - The file to parse
    `theEntityResolver` - A SAX entity resolver, or `null` to use the default
  Returns:
    The parsed descriptor
  Throws:
    `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 occurs

### parseApplicationXml

    public static ApplicationXml parseApplicationXml(java.io.InputStream theInput,
                                                     org.xml.sax.EntityResolver theEntityResolver)
                                              throws org.xml.sax.SAXException,
                                                     javax.xml.parsers.ParserConfigurationException,
                                                     java.io.IOException

  Parses a deployment descriptor provided as input stream.

  Parameters:
    `theInput` - The input stream
    `theEntityResolver` - A SAX entity resolver, or `null` to use the default
  Returns:
    The parsed descriptor
  Throws:
    `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 occurs

### writeApplicationXml

    public static void writeApplicationXml(ApplicationXml theAppXml,
                                           java.io.File theFile)
                                    throws java.io.IOException

  Writes the specified document to a file.

  Parameters:
    `theAppXml` - The descriptor to serialize
    `theFile` - The file to write to
  Throws:
    `java.io.IOException` - If an I/O error occurs

### writeApplicationXml

    public static void writeApplicationXml(ApplicationXml theAppXml,
                                           java.io.File theFile,
                                           java.lang.String theEncoding)
                                    throws java.io.IOException

  Writes the specified document to a file.

  Parameters:
    `theAppXml` - The descriptor to serialize
    `theFile` - The file to write to
    `theEncoding` - The character encoding to use
  Throws:
    `java.io.IOException` - If an I/O error occurs

### writeApplicationXml

    public static void writeApplicationXml(ApplicationXml theAppXml,
                                           java.io.File theFile,
                                           java.lang.String theEncoding,
                                           boolean isIndent)
                                    throws java.io.IOException

  Writes the specified document to a file.

  Parameters:
    `theAppXml` - The descriptor to serialize
    `theFile` - The file to write to
    `theEncoding` - The character encoding to use
    `isIndent` - Whether the written XML should be indented
  Throws:
    `java.io.IOException` - If an I/O error occurs

### writeApplicationXml

    public static void writeApplicationXml(ApplicationXml theAppXml,
                                           java.io.OutputStream theOutput,
                                           java.lang.String theEncoding,
                                           boolean isIndent)
                                    throws java.io.IOException

  Writes the specified document to an output stream.

  Parameters:
    `theAppXml` - The descriptor to serialize
    `theOutput` - The output stream to write to
    `theEncoding` - The character encoding to use
    `isIndent` - Whether the written XML should be indented
  Throws:
    `java.io.IOException` - If an I/O error occurs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.