|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.tools.XMLSerializer
A helper class to handle file serialization of XML Documents.
Method Summary | |
static java.io.File |
getFilePath(java.lang.String directory,
java.lang.String filename)
Gets a File from a directory and filename. |
static org.dom4j.Document |
readDocument(java.io.File file)
Reads an XML Document from a file. |
static java.lang.String |
readFile(java.io.File file)
Reads a text file from the disk. |
static void |
write(org.dom4j.Document document,
java.io.File file)
Writes an XML document to a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.io.File getFilePath(java.lang.String directory, java.lang.String filename)
directory
- The directory under the NaN directory.filename
- The filename of the file.
public static void write(org.dom4j.Document document, java.io.File file)
document
- The XML Document.file
- The file.public static java.lang.String readFile(java.io.File file) throws java.io.IOException
file
- The File to read.
java.io.IOException
- if an error occurs during reading.public static org.dom4j.Document readDocument(java.io.File file) throws XMLParseException
file
- The file.
XMLParseException
- if the file cannot be parsed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |