org.onebusaway.api.impl
Class CustomJsonLibHandler

java.lang.Object
  extended by org.onebusaway.api.impl.CustomJsonLibHandler
All Implemented Interfaces:
org.apache.struts2.rest.handler.ContentTypeHandler

public class CustomJsonLibHandler
extends Object
implements org.apache.struts2.rest.handler.ContentTypeHandler

Handles JSON content using json-lib


Constructor Summary
CustomJsonLibHandler()
           
 
Method Summary
 String fromObject(Object obj, String resultCode, Writer stream)
           
 String getContentType()
           
 String getExtension()
           
 void toObject(Reader in, Object target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomJsonLibHandler

public CustomJsonLibHandler()
Method Detail

toObject

public void toObject(Reader in,
                     Object target)
              throws IOException
Specified by:
toObject in interface org.apache.struts2.rest.handler.ContentTypeHandler
Throws:
IOException

fromObject

public String fromObject(Object obj,
                         String resultCode,
                         Writer stream)
                  throws IOException
Specified by:
fromObject in interface org.apache.struts2.rest.handler.ContentTypeHandler
Throws:
IOException

getContentType

public String getContentType()
Specified by:
getContentType in interface org.apache.struts2.rest.handler.ContentTypeHandler

getExtension

public String getExtension()
Specified by:
getExtension in interface org.apache.struts2.rest.handler.ContentTypeHandler


Copyright © 2011 OneBusAway. All Rights Reserved.