org.dom4j.jaxb
public class JAXBWriter extends JAXBSupport
See Also: XMLWriter javax.xml.bind.JAXBContext
Constructor Summary | |
---|---|
JAXBWriter(String contextPath)
Creates a new JAXBWriter for the given JAXB context path. | |
JAXBWriter(String contextPath, OutputFormat outputFormat)
Creates a new JAXBWriter for the given JAXB context path. | |
JAXBWriter(String contextPath, ClassLoader classloader)
Creates a new JAXBWriter for the given JAXB context path, using the
specified java.lang.Classloader. | |
JAXBWriter(String contextPath, ClassLoader classloader, OutputFormat outputFormat)
Creates a new JAXBWriter for the given JAXB context path, using the
specified java.lang.Classloader. |
Method Summary | |
---|---|
void | endDocument()
Stop writing the document to the output. |
OutputFormat | getOutputFormat()
Returns the OutputFormat that will be used when writing the XML stream.
|
void | setOutput(File file)
Defines to write the resulting output to the specified java.io.File.
|
void | setOutput(OutputStream outputStream)
Defines to write the resulting output to the specified java.io.OutputStream
|
void | setOutput(Writer writer)
Defines to write the resulting output to the specified Writer.
|
void | startDocument()
Start a document by writing the initial XML declaration to the output.
|
void | write(Element jaxbObject)
Writes the specified javax.xml.bind.Elementto the document.
javax.xml.bind.Elementinstances can be created using the
ObjectFactory that is generated by the JAXB compiler.
|
void | writeClose(Element jaxbObject)
Writes the closing tag of the specified javax.xml.bind.Elementto
the document. |
void | writeCloseElement(Element element)
Writes the closing tag of the specified Elementto the
document.
|
void | writeElement(Element element)
Writes the specified Elementto the document.
|
void | writeOpen(Element jaxbObject)
Writes the opening tag of the specified javax.xml.bind.Elementto
the document. javax.xml.bind.Elementinstances can be created
using the ObjectFactory that is generated by the JAXB compiler.
|
void | writeOpenElement(Element element)
Writes the opening tag of the specified Elementto the
document.
|
Parameters: contextPath JAXB context path to be used
See Also: javax.xml.bind.JAXBContext
Parameters: contextPath JAXB context path to be used outputFormat the DOM4J OutputFormatto be used
See Also: javax.xml.bind.JAXBContext
Parameters: contextPath JAXB context path to be used classloader the classloader to be used for loading JAXB
See Also: javax.xml.bind.JAXBContext
Parameters: contextPath JAXB context path to be used classloader the class loader to be used to load JAXB outputFormat the DOM4J OutputFormatto be used
See Also: javax.xml.bind.JAXBContext
Throws: IOException if an error occured while writing the output SAXException thrown by the underlying SAX driver
Returns: Returns the output format.
Parameters: file file to write to
Throws: IOException when the file cannot be found
Parameters: outputStream outputStream to write to.
Throws: IOException DOCUMENT ME!
Parameters: writer writer to write to
Throws: IOException
Throws: IOException if an error occured while writing the output SAXException thrown by the underlying SAX driver
Parameters: jaxbObject
Throws: IOException if an error occured while writing the output JAXBException when an error occured while marshalling the jaxbObject
Parameters: jaxbObject the JAXB element to write
Throws: IOException if an error occured while writing the output JAXBException when an error occured while marshalling the jaxbObject
Parameters: element the Elementto write
Throws: IOException if an error occured while writing the output
Parameters: element the Elementto write
Throws: IOException if an error occured while writing the output
Parameters: jaxbObject the JAXB element to write
Throws: IOException if an error occured while writing the output JAXBException when an error occured while marshalling the jaxbObject
Parameters: element the Elementto write
Throws: IOException if an error occured while writing the output