public abstract class AbstractContentTypeHandler extends Object implements ContentTypeHandler
Constructor and Description |
---|
AbstractContentTypeHandler() |
Modifier and Type | Method and Description |
---|---|
String |
fromObject(Object obj,
String resultCode,
Writer stream)
Writes content to the stream
|
void |
toObject(Reader in,
Object target)
Populates an object using data from the input stream
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromObject, getContentType, getExtension, toObject
public void toObject(Reader in, Object target) throws IOException
ContentTypeHandler
toObject
in interface ContentTypeHandler
in
- The input stream, usually the body of the requesttarget
- The target, usually the action classIOException
- If unable to write to the output streampublic String fromObject(Object obj, String resultCode, Writer stream) throws IOException
ContentTypeHandler
fromObject
in interface ContentTypeHandler
obj
- The object to write to the stream, usually the Action classresultCode
- The original result codestream
- The output stream, usually the responseIOException
- If unable to write to the output streamCopyright © 2000–2020 Apache Software Foundation. All rights reserved.