Class JSON4JArrayProvider

java.lang.Object
com.ibm.websphere.jaxrs.providers.json4j.JSON4JArrayProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<com.ibm.json.java.JSONArray>, javax.ws.rs.ext.MessageBodyWriter<com.ibm.json.java.JSONArray>

@Provider public class JSON4JArrayProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<com.ibm.json.java.JSONArray>, javax.ws.rs.ext.MessageBodyReader<com.ibm.json.java.JSONArray>
  • Constructor Details

    • JSON4JArrayProvider

      public JSON4JArrayProvider()
  • Method Details

    • 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<com.ibm.json.java.JSONArray>
    • readFrom

      public com.ibm.json.java.JSONArray readFrom(Class<com.ibm.json.java.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<com.ibm.json.java.JSONArray>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException
    • getSize

      public long getSize(com.ibm.json.java.JSONArray obj, Class<?> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface javax.ws.rs.ext.MessageBodyWriter<com.ibm.json.java.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<com.ibm.json.java.JSONArray>
    • writeTo

      public void writeTo(com.ibm.json.java.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<com.ibm.json.java.JSONArray>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException