|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrepast.simphony.xml.XMLSerializer
public class XMLSerializer
Wraps an XStream instance and adds converters specialized for simphony.
| Constructor Summary | |
|---|---|
XMLSerializer()
Creates an XMLSerializer. |
|
| Method Summary | |
|---|---|
Object |
fromXML(InputStream input)
Deserializes an object from an xml input stream. |
Object |
fromXML(Reader reader)
Deserializes an object from an xml reader. |
Object |
fromXML(String xml)
Deserializes an object from an xml String. |
void |
registerConverter(com.thoughtworks.xstream.converters.Converter converter)
Registers a xstream converter. |
void |
setClassLoader(ClassLoader classLoader)
Sets the classloader used when serializing / deserializing. |
String |
toXML(Object obj)
Serializes the specified object to XML and returns that XML as a String. |
void |
toXML(Object obj,
OutputStream stream)
Serializes the specified object to the specified OutputStream. |
void |
toXML(Object obj,
Writer writer)
Serializes the specified object to the specified writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLSerializer()
| Method Detail |
|---|
public void registerConverter(com.thoughtworks.xstream.converters.Converter converter)
converter - the converter to registerpublic String toXML(Object obj)
obj - the object to serialize
com.thoughtworks.xstream.XStreamException - if the object cannot
be serialized
public void toXML(Object obj,
Writer writer)
obj - the object to serializedwriter - the writer to write the XML to
com.thoughtworks.xstream.XStreamException - if the object cannot
be serialized
public void toXML(Object obj,
OutputStream stream)
obj - the object to serializedstream - the OutputStream to write the XML to
com.thoughtworks.xstream.XStreamException - if the object cannot
be serializedpublic Object fromXML(InputStream input)
input - the input stream
com.thoughtworks.xstream.XStreamException - if the object cannot be
deserializedpublic Object fromXML(Reader reader)
reader - the xml reader
com.thoughtworks.xstream.XStreamException - if the object cannot be
deserializedpublic Object fromXML(String xml)
xml - the xml String
com.thoughtworks.xstream.XStreamException - if the object cannot be
deserializedpublic void setClassLoader(ClassLoader classLoader)
classLoader - the classloader to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||