Class JSON4JObjectProvider

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

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

    • JSON4JObjectProvider

      public JSON4JObjectProvider()
  • 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.JSONObject>
    • readFrom

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

      public long getSize(com.ibm.json.java.JSONObject 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.JSONObject>
    • 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.JSONObject>
    • writeTo

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