|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts2.rest.handler.JacksonLibHandler
public class JacksonLibHandler
Handles JSON content using jackson-lib
| Constructor Summary | |
|---|---|
JacksonLibHandler()
|
|
| Method Summary | |
|---|---|
String |
fromObject(Object obj,
String resultCode,
Writer stream)
Writes content to the stream |
String |
getContentType()
Gets the content type for this handler |
String |
getExtension()
Gets the extension this handler supports |
void |
setDefaultEncoding(String val)
|
void |
toObject(Reader in,
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 JacksonLibHandler()
| Method Detail |
|---|
public void toObject(Reader in,
Object target)
throws IOException
ContentTypeHandler
toObject in interface ContentTypeHandlerin - The input stream, usually the body of the requesttarget - The target, usually the action class
IOException
public String fromObject(Object obj,
String resultCode,
Writer stream)
throws IOException
ContentTypeHandler
fromObject in interface ContentTypeHandlerobj - The object to write to the stream, usually the Action classresultCode - The original result codestream - The output stream, usually the response
IOException - If unable to write to the output streampublic String getContentType()
ContentTypeHandler
getContentType in interface ContentTypeHandlerpublic String getExtension()
ContentTypeHandler
getExtension in interface ContentTypeHandlerpublic void setDefaultEncoding(String val)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||