Class 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 java.lang.Object
    implements javax.ws.rs.ext.MessageBodyWriter<com.ibm.json.java.JSONObject>, javax.ws.rs.ext.MessageBodyReader<com.ibm.json.java.JSONObject>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getSize​(com.ibm.json.java.JSONObject 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)  
      com.ibm.json.java.JSONObject readFrom​(java.lang.Class<com.ibm.json.java.JSONObject> 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​(com.ibm.json.java.JSONObject obj, 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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JSON4JObjectProvider

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

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

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

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