org.apache.wink.providers.json4j
Class JSON4JArrayProvider

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

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


Constructor Summary
JSON4JArrayProvider()
           
 
Method Summary
 long getSize(JSONArray 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)
           
 JSONArray readFrom(java.lang.Class<JSONArray> 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(JSONArray arr, 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

JSON4JArrayProvider

public JSON4JArrayProvider()
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<JSONArray>

readFrom

public JSONArray readFrom(java.lang.Class<JSONArray> 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<JSONArray>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

getSize

public long getSize(JSONArray 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<JSONArray>

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<JSONArray>

writeTo

public void writeTo(JSONArray arr,
                    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<JSONArray>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException


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