Method throws an {@link MessageProcessingException} if the content of themessage cannot be mapped to an entity of the requested type and {@link IllegalStateException} in case the entity is not backed by an inputstream or if the original entity input stream has already been consumed without {@link #bufferEntity() buffering} the entity data prior consuming.
If the message does not contain an entity body {@code null} is returned.A non-null message instance returned from this method will be cached for subsequent retrievals via {@link #getEntity()}. Unless the supplied entity type is an {@link java.io.InputStream input stream}, this method automatically {@link #close() closes} the an unconsumed original response entity data streamif open. In case the entity data has been buffered, the buffer will be reset prior consuming the buffered data to enable subsequent invocations of {@code readEntity(...)} methods on this response.
@param < T> entity instance Java type. @param entityType the type of entity. @return the message entity; for a zero-length response entities returns {@code null}or a corresponding Java object that represents zero-length data. @throws MessageProcessingException if the content of the message cannot bemapped to an entity of the requested type. @throws IllegalStateException if the entity is not backed by an input stream,the response has been {@link #close() closed} already,or if the entity input stream has been fully consumed already and has not been buffered prior consuming. @see javax.ws.rs.ext.MessageBodyReader @since 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|