|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessageBodyReader<T>
Contract for a provider that supports the conversion of a stream to a
Java type. To add a MessageBodyReader implementation, annotate the
implementation class with @Provider.
A MessageBodyReader implementation may be annotated
with @ConsumeMime to restrict the media types for which it will
be considered suitable.
Provider,
ConsumeMime| Method Summary | |
|---|---|
boolean |
isReadable(java.lang.Class<?> type)
Ascertain if the MessageBodyReader supports a particular type. |
T |
readFrom(java.lang.Class<T> type,
MediaType mediaType,
MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
Read a type from the InputStream. |
| Method Detail |
|---|
boolean isReadable(java.lang.Class<?> type)
type - the type that is to be supported.
T readFrom(java.lang.Class<T> type,
MediaType mediaType,
MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
throws java.io.IOException
InputStream.
type - the type that is to be read from the entity stream.
May be null if only one type is supported.mediaType - the media type of the HTTP entity.httpHeaders - the HTTP headers associated with HTTP entity.entityStream - the InputStream of the HTTP entity.
java.io.IOException - if an IO error arises
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||