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 Object
implements javax.ws.rs.ext.MessageBodyWriter<JSONArray>, javax.ws.rs.ext.MessageBodyReader<JSONArray>


Constructor Summary
JSON4JArrayProvider()
           
 
Method Summary
 long getSize(JSONArray obj, Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isReadable(Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 JSONArray readFrom(Class<JSONArray> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
           
 void writeTo(JSONArray arr, Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, 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(Class<?> clazz,
                          Type type,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<JSONArray>

readFrom

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

getSize

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

isWriteable

public boolean isWriteable(Class<?> clazz,
                           Type type,
                           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,
                    Class<?> clazz,
                    Type type,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> headers,
                    OutputStream os)
             throws IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<JSONArray>
Throws:
IOException
javax.ws.rs.WebApplicationException


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