|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.netseeker.ejoe.adapter.BaseAdapter de.netseeker.ejoe.adapter.XStreamAdapter
public class XStreamAdapter
An adapter for (de)serializing objects via the great XStream library
Field Summary | |
---|---|
protected com.thoughtworks.xstream.XStream |
_xstream
|
Constructor Summary | |
---|---|
XStreamAdapter()
Creates a new instance of XStreamAdapter using compact XML |
|
XStreamAdapter(boolean isCompact)
Creates a new instance of XStreamAdapter |
|
XStreamAdapter(com.thoughtworks.xstream.io.HierarchicalStreamDriver driver)
Creates a new instance of XStreamAdapter using the given HierarchicalStreamDriver |
Method Summary | |
---|---|
java.lang.String |
getContentType()
|
void |
handleClassLoaderChange(java.lang.ClassLoader classLoader)
Signals a change of the ContextClassLoader of the current thread to the adapter. |
java.lang.Object |
read(java.io.InputStream in)
Deserializes an object out of an given InputStream |
void |
write(java.lang.Object obj,
java.io.OutputStream out)
Serializes an object into an output stream |
Methods inherited from class de.netseeker.ejoe.adapter.BaseAdapter |
---|
isSelfBuffered, requiresCustomEOFHandling |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.thoughtworks.xstream.XStream _xstream
Constructor Detail |
---|
public XStreamAdapter()
public XStreamAdapter(boolean isCompact)
isCompact
- true if this Adapter should use compact xml otherwise falseCompactWriter
public XStreamAdapter(com.thoughtworks.xstream.io.HierarchicalStreamDriver driver)
Method Detail |
---|
public java.lang.Object read(java.io.InputStream in) throws java.lang.Exception
SerializeAdapter
in
- the input stream to use for deserialization
java.lang.Exception
public void write(java.lang.Object obj, java.io.OutputStream out) throws java.lang.Exception
SerializeAdapter
obj
- object that should get serializedout
- the outputstream into which the object should serialized
java.lang.Exception
public void handleClassLoaderChange(java.lang.ClassLoader classLoader)
SerializeAdapter
handleClassLoaderChange
in interface SerializeAdapter
handleClassLoaderChange
in class BaseAdapter
public java.lang.String getContentType()
getContentType
in interface SerializeAdapter
getContentType
in class BaseAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |