|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.common.xml.XMLReaderWriterImpl
public class XMLReaderWriterImpl
This implementation will use the JDOMhelper to read in XML files and will use the JDOM utility to write out JDOM XML files.
Field Summary | |
---|---|
static int |
DEFAULT_INDENT_SIZE
|
static boolean |
DEFAULT_USE_NEW_LINES
|
Constructor Summary | |
---|---|
XMLReaderWriterImpl()
|
Method Summary | |
---|---|
org.jdom.Document |
readDocument(java.io.InputStream stream)
This method will write a JDOM Document to an OutputStream. |
void |
setIndentSize(int indent)
This method will set the indent size of all JDOM Documents that are written using this object. |
void |
setUseNewLines(boolean newLines)
This method will set whether or not new Lines are used to mimic the hierarchal structure of all JDOM Documents that are written using this object. |
void |
writeDocument(org.jdom.Document doc,
java.io.OutputStream stream)
This method will write a JDOM Document to an OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_INDENT_SIZE
public static final boolean DEFAULT_USE_NEW_LINES
Constructor Detail |
---|
public XMLReaderWriterImpl()
Method Detail |
---|
public void writeDocument(org.jdom.Document doc, java.io.OutputStream stream) throws java.io.IOException
writeDocument
in interface XMLReaderWriter
doc
- the JDOM document to be written to the OutputStreamstream
- the output stream to be written to.
java.io.IOException
- if there is a problem writing to the OutputStreampublic org.jdom.Document readDocument(java.io.InputStream stream) throws org.jdom.JDOMException, java.io.IOException
readDocument
in interface XMLReaderWriter
stream
- the input stream to read the XML document from.
java.io.IOException
- if there is a problem reading from the InputStream
org.jdom.JDOMException
- if the InputStream does not represent a JDOM
compliant XML document.public void setIndentSize(int indent)
indent
- the number of spaces to indent the XML heirarchy in the
output files.public void setUseNewLines(boolean newLines)
newLines
- whether or not to include new line chars in output files.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |