public abstract class XStreamMarshallerImpl extends AbstractMarshaller
AdaptrisMarshaller
AbstractMarshaller.Deserializer, AbstractMarshaller.Serializer
AdaptrisMarshaller.MarshalInputStream, AdaptrisMarshaller.MarshalOutputStream
Modifier and Type | Field and Description |
---|---|
protected com.thoughtworks.xstream.XStream |
instance |
Constructor and Description |
---|
XStreamMarshallerImpl() |
Modifier and Type | Method and Description |
---|---|
protected abstract com.thoughtworks.xstream.XStream |
getInstance()
Typically it will do something like this:-
|
java.lang.String |
marshal(java.lang.Object obj)
Marshalls an object to XML.
|
void |
marshal(java.lang.Object obj,
java.io.Writer writer)
Marshalls an object to XML.
|
java.lang.Object |
unmarshal(java.io.Reader reader)
Unmarshalls an
Object based on the passed Reader . |
invokeDeserialize, invokeSerialize, marshal, marshal, marshal, marshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
uncheckedMarshal, uncheckedUnmarshal
protected abstract com.thoughtworks.xstream.XStream getInstance()
if (instance == null){
create and configure a new instance
}
return instance;
public java.lang.String marshal(java.lang.Object obj) throws CoreException
AdaptrisMarshaller
obj
- the Object
to marshall to XMLObject
CoreException
- wrapping any underlying Exception
public void marshal(java.lang.Object obj, java.io.Writer writer) throws CoreException
AdaptrisMarshaller
obj
- the Object
to marshall to XMLwriter
- the writer to write toCoreException
- wrapping any underlying Exception
public java.lang.Object unmarshal(java.io.Reader reader) throws CoreException
AdaptrisMarshaller
Unmarshalls an Object
based on the passed Reader
.
reader
- a Reader
with XML to unmarshalObject
CoreException
- wrapping any underlying Exception