public class JAXBFactory
extends java.lang.Object
Constructor and Description |
---|
JAXBFactory(java.lang.Class... contextClass) |
JAXBFactory(java.lang.Class contextClass) |
JAXBFactory(java.lang.String contextPath) |
Modifier and Type | Method and Description |
---|---|
java.io.File |
marshallGzipped(java.lang.Object object,
java.io.File file)
Marshalls Java object in a gzipped XMl file
|
java.io.StringWriter |
marshallXML(java.lang.Object object) |
java.io.File |
marshallXML(java.lang.Object object,
java.io.File file)
Marshalls Java object into XML file
|
java.io.File |
marshallZipped(java.lang.Object object,
java.io.File file)
Marshalls Java object in a zipped XMl file
|
java.lang.Object |
unmarshallXML(java.io.File file)
Unmarshalls XML element from file into java object
|
java.lang.Object |
unmarshallZipped(java.io.File file) |
public JAXBFactory(java.lang.Class contextClass) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public JAXBFactory(java.lang.Class... contextClass) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public JAXBFactory(java.lang.String contextPath) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public java.lang.Object unmarshallXML(java.io.File file)
file
- the XML file to be unmarshalledfile
public java.lang.Object unmarshallZipped(java.io.File file)
public java.io.File marshallXML(java.lang.Object object, java.io.File file)
object
- object to be marshalledfile
- file to save the marshalled objectpublic java.io.StringWriter marshallXML(java.lang.Object object)
public java.io.File marshallZipped(java.lang.Object object, java.io.File file)
object
- object to be marshalledfile
- non zip file to save the marshalled objectpublic java.io.File marshallGzipped(java.lang.Object object, java.io.File file)
object
- object to be marshalledfile
- file to save the marshalled object