public class XStreamHandler extends Object implements ContentTypeHandler
| Constructor and Description |
|---|
XStreamHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected com.thoughtworks.xstream.XStream |
createXStream() |
String |
fromObject(Object obj,
String resultCode,
Writer out)
Writes content to the stream
|
String |
getContentType()
Gets the content type for this handler
|
String |
getExtension()
Gets the extension this handler supports
|
void |
toObject(Reader in,
Object target)
Populates an object using data from the input stream
|
public String fromObject(Object obj, String resultCode, Writer out) throws IOException
ContentTypeHandlerfromObject in interface ContentTypeHandlerobj - The object to write to the stream, usually the Action classresultCode - The original result codeout - The output stream, usually the responseIOException - If unable to write to the output streampublic void toObject(Reader in, Object target)
ContentTypeHandlertoObject in interface ContentTypeHandlerin - The input stream, usually the body of the requesttarget - The target, usually the action classprotected com.thoughtworks.xstream.XStream createXStream()
public String getContentType()
ContentTypeHandlergetContentType in interface ContentTypeHandlerpublic String getExtension()
ContentTypeHandlergetExtension in interface ContentTypeHandlerCopyright © 2000–2016 Apache Software Foundation. All rights reserved.