com.sun.grid.jgdi.configuration.xml
public class XMLUtil extends java.lang.Object
Implement missing primitive handlers
Modifier and Type | Class and Description |
---|---|
static class |
XMLUtil.Context |
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 and Description |
---|
XMLUtil() |
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) |
public static final java.lang.String HEADER
public static final java.lang.String STRING_TAG
public static final java.lang.String BOOLEAN_TAG
public static final java.lang.String INT_TAG
public static final java.lang.String SHORT_TAG
public static final java.lang.String LONG_TAG
public static final java.lang.String DOUBLE_TAG
public static final java.lang.String FLOAT_TAG
public static boolean write(GEObject obj, XMLUtil.Context ctx)
public static boolean write(GEObject obj, java.io.Writer wr) throws java.io.IOException
java.io.IOException
public static boolean write(GEObject obj, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static boolean write(GEObject obj, java.io.File file) throws java.io.IOException
java.io.IOException
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
InputStream
.in
- the InputStreamproperties
- All ${key} expressions in the xml file will be replaced be
the corresponding value from the propertiesjava.io.IOException
- on any I/O Errorjavax.xml.parsers.ParserConfigurationException
- if a SAX parser has an invalid configurationorg.xml.sax.SAXException
- on any parse errorpublic static java.lang.Object read(java.io.InputStream in) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
InputStream
.in
- the InputStreamjava.io.IOException
- on any I/O Errorjavax.xml.parsers.ParserConfigurationException
- if a SAX parser has an invalid configurationorg.xml.sax.SAXException
- on any parse errorpublic 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
File
.file
- the fileproperties
- All ${key} expressions in the xml file will be replaced be
the corresponding value from the propertiesjava.io.IOException
- on any I/O Errorjavax.xml.parsers.ParserConfigurationException
- if a SAX parser has an invalid configurationorg.xml.sax.SAXException
- on any parse errorpublic static java.lang.Object read(java.io.File file) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
File
.file
- the filejava.io.IOException
- on any I/O Errorjavax.xml.parsers.ParserConfigurationException
- if a SAX parser has an invalid configurationorg.xml.sax.SAXException
- on any parse errorpublic 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
Reader
.rd
- the readerjava.io.IOException
- on any I/O Errorjavax.xml.parsers.ParserConfigurationException
- if a SAX parser has an invalid configurationorg.xml.sax.SAXException
- on any parse errorpublic static java.lang.Object read(java.io.Reader rd) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
Reader
.rd
- the readerjava.io.IOException
- on any I/O Errorjavax.xml.parsers.ParserConfigurationException
- if a SAX parser has an invalid configurationorg.xml.sax.SAXException
- on any parse errorCopyright © 2007 Sun Microsystems, Inc. All rights reserved.