org.sonatype.gshell.util.marshal
Class MarshallerSupport<T>
java.lang.Object
org.sonatype.gshell.util.marshal.MarshallerSupport<T>
- All Implemented Interfaces:
- Marshaller<T>
public class MarshallerSupport<T>
- extends Object
- implements Marshaller<T>
Support for Marshaller implementations.
- Since:
- 2.3
- Author:
- Jason Dillon
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarshallerSupport
public MarshallerSupport(Class rootType)
createXStream
protected com.thoughtworks.xstream.XStream createXStream()
configure
protected void configure(com.thoughtworks.xstream.XStream xs)
configureAnnotations
protected void configureAnnotations(com.thoughtworks.xstream.XStream xs,
Class... classes)
marshal
public void marshal(T model,
OutputStream output)
- Specified by:
marshal in interface Marshaller<T>
marshal
public void marshal(T model,
Writer writer)
- Specified by:
marshal in interface Marshaller<T>
marshal
public String marshal(T root)
- Specified by:
marshal in interface Marshaller<T>
unmarshal
public T unmarshal(InputStream input)
- Specified by:
unmarshal in interface Marshaller<T>
unmarshal
public T unmarshal(Reader reader)
- Specified by:
unmarshal in interface Marshaller<T>
unmarshal
public T unmarshal(String xml)
- Specified by:
unmarshal in interface Marshaller<T>
unmarshal
public T unmarshal(URL url)
throws IOException
- Specified by:
unmarshal in interface Marshaller<T>
- Throws:
IOException
marshal
public void marshal(T root,
File file)
throws IOException
- Specified by:
marshal in interface Marshaller<T>
- Throws:
IOException
unmarshal
public T unmarshal(File file)
throws IOException
- Specified by:
unmarshal in interface Marshaller<T>
- Throws:
IOException
Copyright © 2008-2011 Sonatype. All Rights Reserved.