Class JSON4JObjectProvider

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

@Provider @Consumes({"application/json","application/javascript"}) @Produces({"application/json","application/javascript"}) public class JSON4JObjectProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter, javax.ws.rs.ext.MessageBodyReader
  • 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
    • readFrom

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

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

      public void writeTo(Object obj, Class clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface javax.ws.rs.ext.MessageBodyWriter
      Throws:
      IOException
      javax.ws.rs.WebApplicationException