org.apache.wink.providers.json
Class JsonArrayProvider

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

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


Constructor Summary
JsonArrayProvider()
           
 
Method Summary
 long getSize(org.json.JSONArray t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 org.json.JSONArray readFrom(java.lang.Class<org.json.JSONArray> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)
           
 void writeTo(org.json.JSONArray t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonArrayProvider

public JsonArrayProvider()
Method Detail

getSize

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

isWriteable

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

writeTo

public void writeTo(org.json.JSONArray t,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
                    java.io.OutputStream entityStream)
             throws java.io.IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<org.json.JSONArray>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException

isReadable

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

readFrom

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


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