public class JAXBDataSource extends ReaderWriterDataSource
ReaderWriterDataSource implementation to provide
Marshaller marshalling and Unmarshaller unmarshalling
services.CHARSETAPPLICATION_OCTET_STREAM, APPLICATION_XML, CONTENT_TYPE, TEXT_HTML, TEXT_PLAIN| Constructor and Description |
|---|
JAXBDataSource()
No-argument constructor.
|
JAXBDataSource(Object object)
Construct and marshal the argument
Object. |
| Modifier and Type | Method and Description |
|---|---|
void |
marshal(JAXBContext context,
Object object)
Marshal the argument
Object. |
void |
marshal(Object object)
Marshal the argument
Object. |
<T> T |
unmarshal(Class<? extends T> type)
Unmarshal the argument
Object. |
<T> T |
unmarshal(JAXBContext context,
Class<? extends T> type)
Unmarshal the argument
Object. |
getBufferedReader, getCharset, getPrintStream, getPrintWriter, getReader, getWriter, nameOf, toString, writeTogetContentType, getDataSource, getInputStream, getName, getOutputStream, setContentType, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclear, getInputStream, getOutputStream, length, wrap, wrap, writeTopublic JAXBDataSource(Object object)
Object.object - The Object to marshal.public JAXBDataSource()
public void marshal(Object object) throws IOException, JAXBException
Object.object - The Object to marshal.IOException - If an I/O exception occurs.JAXBException - If a JAXB exception occurs.public void marshal(JAXBContext context, Object object) throws IOException, JAXBException
Object.context - The JAXBContext.object - The Object to marshal.IOException - If an I/O exception occurs.JAXBException - If a JAXB exception occurs.public <T> T unmarshal(Class<? extends T> type) throws IOException, JAXBException
Object.T - The target type.type - The target Class.Object.IOException - If an I/O exception occurs.JAXBException - If a JAXB exception occurs.public <T> T unmarshal(JAXBContext context, Class<? extends T> type) throws IOException, JAXBException
Object.T - The target type.context - The JAXBContext.type - The target Class.Object.IOException - If an I/O exception occurs.JAXBException - If a JAXB exception occurs.Copyright © 2015–2021. All rights reserved.