@Provider public class IIOImageProvider extends AbstractEntityProvider<IIOImage>
Constructor and Description |
---|
IIOImageProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyReader can produce an instance of a
particular type.
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyWriter supports a particular type.
|
IIOImage |
readFrom(Class<IIOImage> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
Read a type from the
InputStream . |
void |
writeTo(IIOImage t,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
Write a type to an HTTP response.
|
getSize
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
MessageBodyReader
type
- genericType
- annotations
- mediaType
- the media type of the HTTP entity, if one is not
specified in the request then application/octet-stream
is
used.javax.ws.rs.ext.MessageBodyReader#isReadable(java.lang.Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[])
public IIOImage readFrom(Class<IIOImage> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
MessageBodyReader
InputStream
.type
- genericType
- annotations
- mediaType
- httpHeaders
- entityStream
- IOException
WebApplicationException
MessageBodyReader.readFrom(java.lang.Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[],
javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap,
java.io.InputStream)
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
MessageBodyWriter
type
- genericType
- annotations
- mediaType
- the media type of the HTTP entity.javax.ws.rs.ext.MessageBodyWriter#isWriteable(java.lang.Class,
java.lang.reflect.Type, java.lang.annotation.Annotation[])
public void writeTo(IIOImage t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
MessageBodyWriter
t
- type
- genericType
- annotations
- mediaType
- httpHeaders
- entityStream
- IOException
WebApplicationException
MessageBodyWriter.writeTo(java.lang.Object,
java.lang.Class, java.lang.reflect.Type,
java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType,
javax.ws.rs.core.MultivaluedMap, java.io.OutputStream)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.