Class JSON4JArrayProvider
java.lang.Object
com.ibm.websphere.jaxrs.providers.json4j.JSON4JArrayProvider
- 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 JSON4JArrayProvider
extends Object
implements javax.ws.rs.ext.MessageBodyWriter, javax.ws.rs.ext.MessageBodyReader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(Object 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) readFrom
(Class clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap headers, InputStream is) void
writeTo
(Object arr, Class clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap headers, OutputStream os)
-
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 interfacejavax.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 interfacejavax.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 interfacejavax.ws.rs.ext.MessageBodyWriter
-
isWriteable
public boolean isWriteable(Class clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter
-
writeTo
public void writeTo(Object arr, 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 interfacejavax.ws.rs.ext.MessageBodyWriter
- Throws:
IOException
javax.ws.rs.WebApplicationException
-