|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.xml.XMLOutputter
Output an object as XML to a stream/writer. Each instance of this object can be re-used, as the output methods create an internal helper to actually output the XML.
Nested Class Summary | |
static class |
XMLOutputter.Handler
Inner class to manage the SAX events. |
Constructor Summary | |
XMLOutputter()
Constructor for XMLOutputter, using the default meta data. |
|
XMLOutputter(XMLMetaData metaData)
Constructor for XMLOutputter |
Method Summary | |
protected org.xml.sax.ContentHandler |
createHandler(java.io.Writer writer,
boolean compressed)
Create the SAX handler to handle the events. |
XMLMetaData |
getMetaData()
Gets the metadata for XML output. |
java.lang.String |
output(java.lang.Object bean)
Output a Bean as a string. |
java.lang.String |
output(java.lang.Object bean,
java.lang.String rootName)
Output a Bean as a string. |
void |
output(java.lang.Object bean,
java.lang.String rootName,
java.io.OutputStream out)
Output a bean to the specified output stream. |
void |
output(java.lang.Object bean,
java.lang.String rootName,
java.io.Writer out)
Output a bean to the specified Writer. |
void |
setMetaData(XMLMetaData metaData)
Sets the metaData for XML output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLOutputter()
public XMLOutputter(XMLMetaData metaData)
Method Detail |
public void output(java.lang.Object bean, java.lang.String rootName, java.io.Writer out) throws java.lang.Exception
bean
- the bean to outputrootName
- the name of the root elementout
- output stream to write to
java.lang.Exception
public void output(java.lang.Object bean, java.lang.String rootName, java.io.OutputStream out) throws java.lang.Exception
bean
- the bean to outputrootName
- the name of the root elementout
- output stream to write to
java.lang.Exception
public java.lang.String output(java.lang.Object bean) throws java.lang.Exception
bean
- the bean to output
java.lang.Exception
public java.lang.String output(java.lang.Object bean, java.lang.String rootName) throws java.lang.Exception
bean
- the bean to outputrootName
- the name of the root element
java.lang.Exception
public XMLMetaData getMetaData()
public void setMetaData(XMLMetaData metaData)
metaData
- the metaData to useprotected org.xml.sax.ContentHandler createHandler(java.io.Writer writer, boolean compressed) throws java.lang.Exception
writer
- the writer to write tocompressed
- whether to compress the output
java.lang.Exception
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |