com.sun.grid.jgdi.configuration.xml

## Class XMLUtil

- java.lang.Object
- - com.sun.grid.jgdi.configuration.xml.XMLUtil

-     public class XMLUtil
      extends java.lang.Object

  This class implements the serialisation/deserialion of cull object int xml.
  TODO:
    alpha ??

    Implement missing primitive handlers

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `XMLUtil.Context`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `BOOLEAN_TAG`
    `static java.lang.String` | `DOUBLE_TAG`
    `static java.lang.String` | `FLOAT_TAG`
    `static java.lang.String` | `HEADER`
    `static java.lang.String` | `INT_TAG`
    `static java.lang.String` | `LONG_TAG`
    `static java.lang.String` | `SHORT_TAG`
    `static java.lang.String` | `STRING_TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.Object` | `read(java.io.File file)` Read a XML definition of a gridengine object from a `File`.
    `static java.lang.Object` | `read(java.io.File file, java.util.Map properties)` Read a XML definition of a gridengine object from a `File`.
    `static java.lang.Object` | `read(java.io.InputStream in)` Read a XML definition of a gridengine object from an `InputStream`.
    `static java.lang.Object` | `read(java.io.InputStream in, java.util.Map properties)` Read a XML definition of a gridengine object from an `InputStream`.
    `static java.lang.Object` | `read(java.io.Reader rd)` Read a XML definition of a gridengine object from a `Reader`.
    `static java.lang.Object` | `read(java.io.Reader rd, java.util.Map properties)` Read a XML definition of a gridengine object from a `Reader`.
    `static boolean` | `write(GEObject obj, java.io.File file)`
    `static boolean` | `write(GEObject obj, java.io.OutputStream out)`
    `static boolean` | `write(GEObject obj, java.io.Writer wr)`
    `static boolean` | `write(GEObject obj, XMLUtil.Context ctx)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### HEADER

          public static final java.lang.String HEADER

      See Also:
        Constant Field Values

    - #### STRING_TAG

          public static final java.lang.String STRING_TAG

      See Also:
        Constant Field Values

    - #### BOOLEAN_TAG

          public static final java.lang.String BOOLEAN_TAG

      See Also:
        Constant Field Values

    - #### INT_TAG

          public static final java.lang.String INT_TAG

      See Also:
        Constant Field Values

    - #### SHORT_TAG

          public static final java.lang.String SHORT_TAG

      See Also:
        Constant Field Values

    - #### LONG_TAG

          public static final java.lang.String LONG_TAG

      See Also:
        Constant Field Values

    - #### DOUBLE_TAG

          public static final java.lang.String DOUBLE_TAG

      See Also:
        Constant Field Values

    - #### FLOAT_TAG

          public static final java.lang.String FLOAT_TAG

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XMLUtil

          public XMLUtil()

  - ### Method Detail

    - #### write

          public static boolean write(GEObject obj,
                                      XMLUtil.Context ctx)

    - #### write

          public static boolean write(GEObject obj,
                                      java.io.Writer wr)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### write

          public static boolean write(GEObject obj,
                                      java.io.OutputStream out)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### write

          public static boolean write(GEObject obj,
                                      java.io.File file)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### read

          public static java.lang.Object read(java.io.InputStream in,
                                              java.util.Map properties)
                                       throws java.io.IOException,
                                              javax.xml.parsers.ParserConfigurationException,
                                              org.xml.sax.SAXException

      Read a XML definition of a gridengine object from an `InputStream`.
      Parameters:
        `in` - the InputStream
        `properties` - All ${key} expressions in the xml file will be replaced be the corresponding value from the properties
      Returns:
        the gridengine object
      Throws:
        `java.io.IOException` - on any I/O Error
        `javax.xml.parsers.ParserConfigurationException` - if a SAX parser has an invalid configuration
        `org.xml.sax.SAXException` - on any parse error

    - #### read

          public static java.lang.Object read(java.io.InputStream in)
                                       throws java.io.IOException,
                                              javax.xml.parsers.ParserConfigurationException,
                                              org.xml.sax.SAXException

      Read a XML definition of a gridengine object from an `InputStream`.
      Parameters:
        `in` - the InputStream
      Returns:
        the gridengine object
      Throws:
        `java.io.IOException` - on any I/O Error
        `javax.xml.parsers.ParserConfigurationException` - if a SAX parser has an invalid configuration
        `org.xml.sax.SAXException` - on any parse error

    - #### read

          public static java.lang.Object read(java.io.File file,
                                              java.util.Map properties)
                                       throws java.io.IOException,
                                              javax.xml.parsers.ParserConfigurationException,
                                              org.xml.sax.SAXException

      Read a XML definition of a gridengine object from a `File`.
      Parameters:
        `file` - the file
        `properties` - All ${key} expressions in the xml file will be replaced be the corresponding value from the properties
      Returns:
        the gridengine object
      Throws:
        `java.io.IOException` - on any I/O Error
        `javax.xml.parsers.ParserConfigurationException` - if a SAX parser has an invalid configuration
        `org.xml.sax.SAXException` - on any parse error

    - #### read

          public static java.lang.Object read(java.io.File file)
                                       throws java.io.IOException,
                                              javax.xml.parsers.ParserConfigurationException,
                                              org.xml.sax.SAXException

      Read a XML definition of a gridengine object from a `File`.
      Parameters:
        `file` - the file
      Returns:
        the gridengine object
      Throws:
        `java.io.IOException` - on any I/O Error
        `javax.xml.parsers.ParserConfigurationException` - if a SAX parser has an invalid configuration
        `org.xml.sax.SAXException` - on any parse error

    - #### read

          public static java.lang.Object read(java.io.Reader rd,
                                              java.util.Map properties)
                                       throws java.io.IOException,
                                              javax.xml.parsers.ParserConfigurationException,
                                              org.xml.sax.SAXException

      Read a XML definition of a gridengine object from a `Reader`.
      Parameters:
        `rd` - the reader
      Returns:
        the gridengine object
      Throws:
        `java.io.IOException` - on any I/O Error
        `javax.xml.parsers.ParserConfigurationException` - if a SAX parser has an invalid configuration
        `org.xml.sax.SAXException` - on any parse error

    - #### read

          public static java.lang.Object read(java.io.Reader rd)
                                       throws java.io.IOException,
                                              javax.xml.parsers.ParserConfigurationException,
                                              org.xml.sax.SAXException

      Read a XML definition of a gridengine object from a `Reader`.
      Parameters:
        `rd` - the reader
      Returns:
        the gridengine object
      Throws:
        `java.io.IOException` - on any I/O Error
        `javax.xml.parsers.ParserConfigurationException` - if a SAX parser has an invalid configuration
        `org.xml.sax.SAXException` - on any parse error

Copyright © 2007 Sun Microsystems, Inc. All rights reserved.