public interface AdaptrisMarshaller
Defines methods required to 'marshal' Java objects to XML.
Modifier and Type | Interface and Description |
---|---|
static interface |
AdaptrisMarshaller.MarshalInputStream |
static interface |
AdaptrisMarshaller.MarshalOutputStream |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
marshal(java.lang.Object obj)
Marshalls an object to XML.
|
void |
marshal(java.lang.Object obj,
java.io.File file)
Marshalls an object to XML.
|
void |
marshal(java.lang.Object obj,
java.io.OutputStream outputStream)
Marshalls an object to XML.
|
void |
marshal(java.lang.Object obj,
java.lang.String fileName)
Marshalls an object to XML.
|
void |
marshal(java.lang.Object obj,
java.net.URL fileUrl)
Marshalls an XML representation of the passed
Object to the
file sytem location denoted by the passed URL . |
void |
marshal(java.lang.Object obj,
java.io.Writer writer)
Marshalls an object to XML.
|
static void |
uncheckedMarshal(AdaptrisMarshaller m,
java.lang.Object o,
AdaptrisMarshaller.MarshalOutputStream out)
Convenience method to wrap marshalling activities with a RuntimeException .
|
static java.lang.Object |
uncheckedUnmarshal(AdaptrisMarshaller m,
java.lang.Object o,
AdaptrisMarshaller.MarshalInputStream in)
Convenience method to wrap unmarshalling activities with a RuntimeException .
|
java.lang.Object |
unmarshal(java.io.File file)
Unmarshalls an
Object based on the passed file . |
java.lang.Object |
unmarshal(java.io.InputStream stream)
Unmarshals an
Object based on the passed
InputStream . |
java.lang.Object |
unmarshal(java.io.Reader reader)
Unmarshalls an
Object based on the passed Reader . |
java.lang.Object |
unmarshal(java.lang.String xml)
Unmarshalls an
Object from the passed XML. |
java.lang.Object |
unmarshal(java.net.URL fileUrl)
Unmarshalls an
Object based on the passed file system
URL . |
java.lang.Object |
unmarshal(URLString location)
Unmarshals an
Object from the passed URLString
location. |
java.lang.String marshal(java.lang.Object obj) throws CoreException
obj
- the Object
to marshall to XMLObject
CoreException
- wrapping any underlying Exception
void marshal(java.lang.Object obj, java.lang.String fileName) throws CoreException
obj
- the Object
to marshall to XMLfileName
- the name of the file to write toCoreException
- wrapping any underlying Exception
void marshal(java.lang.Object obj, java.io.File file) throws CoreException
obj
- the Object
to marshall to XMLfile
- the file to write toCoreException
- wrapping any underlying Exception
void marshal(java.lang.Object obj, java.io.Writer writer) throws CoreException
obj
- the Object
to marshall to XMLwriter
- the writer to write toCoreException
- wrapping any underlying Exception
void marshal(java.lang.Object obj, java.io.OutputStream outputStream) throws CoreException
obj
- the object to marshall to XMLoutputStream
- the OutputStream to write toCoreException
- wrapping any underlying Exception
void marshal(java.lang.Object obj, java.net.URL fileUrl) throws CoreException
Marshalls an XML representation of the passed Object
to the
file sytem location denoted by the passed URL
.
obj
- the Object
to marshall to XMLfileUrl
- the file system location to write toCoreException
- wrapping any underlying Exception
java.lang.Object unmarshal(java.lang.String xml) throws CoreException
Unmarshalls an Object
from the passed XML.
xml
- the String
to unmarshalObject
CoreException
- wrapping any underlying Exception
java.lang.Object unmarshal(java.io.File file) throws CoreException
Unmarshalls an Object
based on the passed file
.
file
- a file containing XML to unmarshalObject
CoreException
- wrapping any underlying Exception
java.lang.Object unmarshal(java.net.URL fileUrl) throws CoreException
Unmarshalls an Object
based on the passed file system
URL
.
fileUrl
- the file system location to read fromObject
CoreException
- wrapping any underlying Exception
java.lang.Object unmarshal(java.io.Reader reader) throws CoreException
Unmarshalls an Object
based on the passed Reader
.
reader
- a Reader
with XML to unmarshalObject
CoreException
- wrapping any underlying Exception
java.lang.Object unmarshal(java.io.InputStream stream) throws CoreException
Unmarshals an Object
based on the passed
InputStream
.
stream
- an InputStream
of XML to unmarshalObject
CoreException
- wrapping any underlying Exception
java.lang.Object unmarshal(URLString location) throws CoreException
Unmarshals an Object
from the passed URLString
location.
location
- the location to unmarshal fromObject
CoreException
- wrapping any underlying Exception
sstatic void uncheckedMarshal(AdaptrisMarshaller m, java.lang.Object o, AdaptrisMarshaller.MarshalOutputStream out)
static java.lang.Object uncheckedUnmarshal(AdaptrisMarshaller m, java.lang.Object o, AdaptrisMarshaller.MarshalInputStream in)