|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.rest.handler.JsonLibHandler
public class JsonLibHandler
Handles JSON content using json-lib
Constructor Summary | |
---|---|
JsonLibHandler()
|
Method Summary | |
---|---|
java.lang.String |
fromObject(java.lang.Object obj,
java.lang.String resultCode,
java.io.Writer stream)
Writes content to the stream |
java.lang.String |
getContentType()
Gets the content type for this handler |
java.lang.String |
getExtension()
Gets the extension this handler supports |
void |
toObject(java.io.Reader in,
java.lang.Object target)
Populates an object using data from the input stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonLibHandler()
Method Detail |
---|
public void toObject(java.io.Reader in, java.lang.Object target) throws java.io.IOException
ContentTypeHandler
toObject
in interface ContentTypeHandler
in
- The input stream, usually the body of the requesttarget
- The target, usually the action class
java.io.IOException
public java.lang.String fromObject(java.lang.Object obj, java.lang.String resultCode, java.io.Writer stream) throws java.io.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 response
java.io.IOException
- If unable to write to the output streampublic java.lang.String getContentType()
ContentTypeHandler
getContentType
in interface ContentTypeHandler
public java.lang.String getExtension()
ContentTypeHandler
getExtension
in interface ContentTypeHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |