@Provider @Produces(value="application/x-java-serialized-object") @Consumes(value="application/x-java-serialized-object") public class SerializableProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<Serializable>, javax.ws.rs.ext.MessageBodyWriter<Serializable>
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_SERIALIZABLE |
static javax.ws.rs.core.MediaType |
APPLICATION_SERIALIZABLE_TYPE |
Constructor and Description |
---|
SerializableProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(Serializable t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
Serializable |
readFrom(Class<Serializable> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(Serializable t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public static final javax.ws.rs.core.MediaType APPLICATION_SERIALIZABLE_TYPE
public static final String APPLICATION_SERIALIZABLE
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Serializable>
public long getSize(Serializable t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Serializable>
public void writeTo(Serializable t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Serializable>
IOException
javax.ws.rs.WebApplicationException
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Serializable>
public Serializable readFrom(Class<Serializable> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Serializable>
IOException
javax.ws.rs.WebApplicationException
Copyright © 2015 JBoss by Red Hat. All rights reserved.