public class MarshallerSupport<T> extends Object implements Marshaller<T>
Marshaller implementations.| Constructor and Description |
|---|
MarshallerSupport(Class rootType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(com.thoughtworks.xstream.XStream xs) |
protected void |
configureAnnotations(com.thoughtworks.xstream.XStream xs,
Class... classes) |
protected com.thoughtworks.xstream.XStream |
createXStream() |
String |
marshal(T root) |
void |
marshal(T root,
File file) |
void |
marshal(T model,
OutputStream output) |
void |
marshal(T model,
Writer writer) |
T |
unmarshal(File file) |
T |
unmarshal(InputStream input) |
T |
unmarshal(Reader reader) |
T |
unmarshal(String xml) |
T |
unmarshal(URL url) |
public MarshallerSupport(Class rootType)
protected com.thoughtworks.xstream.XStream createXStream()
protected void configure(com.thoughtworks.xstream.XStream xs)
protected void configureAnnotations(com.thoughtworks.xstream.XStream xs,
Class... classes)
public void marshal(T model, OutputStream output)
marshal in interface Marshaller<T>public void marshal(T model, Writer writer)
marshal in interface Marshaller<T>public String marshal(T root)
marshal in interface Marshaller<T>public T unmarshal(InputStream input)
unmarshal in interface Marshaller<T>public T unmarshal(Reader reader)
unmarshal in interface Marshaller<T>public T unmarshal(String xml)
unmarshal in interface Marshaller<T>public T unmarshal(URL url) throws IOException
unmarshal in interface Marshaller<T>IOExceptionpublic void marshal(T root, File file) throws IOException
marshal in interface Marshaller<T>IOExceptionpublic T unmarshal(File file) throws IOException
unmarshal in interface Marshaller<T>IOExceptionCopyright © 2008-2012 Sonatype. All Rights Reserved.