|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.grid.jgdi.configuration.xml.XMLUtil
public class XMLUtil
This class implements the serialisation/deserialion of cull object int xml.
Implement missing primitive handlers
Nested Class Summary | |
---|---|
static class |
XMLUtil.Context
|
Field Summary | |
---|---|
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 | |
---|---|
XMLUtil()
|
Method Summary | |
---|---|
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 |
---|
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
Constructor Detail |
---|
public XMLUtil()
Method Detail |
---|
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 properties
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 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 InputStream
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 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 properties
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 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 file
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 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 reader
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 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 reader
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |