If an exception occurs during processing, a ConversionException
should be thrown.
If working with the high level com. facade,
you can register new converters using the XStream.registerConverter() method.
If working with the lower level API, the
com. implementation is
responsible for looking up the appropriate converter.
Converters for object that can store all information in a single value
should implement com..
com.
provides a starting point.
com.
provides a starting point for objects that hold a collection of other objects
(such as Lists and Maps).
com.thoughtworks.xstream.XStream , com.thoughtworks.xstream.converters.ConverterLookup , com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter , com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
| Modifier and Type | Method and Description |
|---|---|
| public void | marshal(Object
The object to be marshalled. source, HierarchicalStreamWriter A stream to write to. writer, MarshallingContext A context that allows nested objects to be processed by XStream. context)Convert an object to textual data. |
| public Object | Returns: The resulting object.The stream to read the text from. reader, UnmarshallingContext context)Convert textual data back into an object. |
| marshal | back to summary |
|---|---|
| public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) Convert an object to textual data.
| |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) Convert textual data back into an object.
| |