org.apache.wink.providers.json4j
Class JSON4JObjectProvider

java.lang.Object
  extended by org.apache.wink.providers.json4j.JSON4JObjectProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<JSONObject>, javax.ws.rs.ext.MessageBodyWriter<JSONObject>

@Provider
public class JSON4JObjectProvider
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyWriter<JSONObject>, javax.ws.rs.ext.MessageBodyReader<JSONObject>


Constructor Summary
JSON4JObjectProvider()
           
 
Method Summary
 long getSize(JSONObject obj, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 JSONObject readFrom(java.lang.Class<JSONObject> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers, java.io.InputStream is)
           
 void writeTo(JSONObject obj, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers, java.io.OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSON4JObjectProvider

public JSON4JObjectProvider()
Method Detail

isReadable

public boolean isReadable(java.lang.Class<?> clazz,
                          java.lang.reflect.Type type,
                          java.lang.annotation.Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<JSONObject>

readFrom

public JSONObject readFrom(java.lang.Class<JSONObject> clazz,
                           java.lang.reflect.Type type,
                           java.lang.annotation.Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType,
                           javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers,
                           java.io.InputStream is)
                    throws java.io.IOException,
                           javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<JSONObject>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

getSize

public long getSize(JSONObject obj,
                    java.lang.Class<?> clazz,
                    java.lang.reflect.Type type,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<JSONObject>

isWriteable

public boolean isWriteable(java.lang.Class<?> clazz,
                           java.lang.reflect.Type type,
                           java.lang.annotation.Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<JSONObject>

writeTo

public void writeTo(JSONObject obj,
                    java.lang.Class<?> clazz,
                    java.lang.reflect.Type type,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers,
                    java.io.OutputStream os)
             throws java.io.IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<JSONObject>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.