The JAX-RS framework uses entity provider components for the marshaling and unmarshaling of the message body content (entity) present in the response and request objects, respectively. It is the entity provider component that maps an entity with the associated Java types.
The following table lists the default entity mappings provided by the JAX-RS runtime via a set of built-in entity providers. When you use one of the internet media types present in the following table to represent the request or response entity body, the framework takes care of the conversion and reconversion of the entity body to the associated Java type:
Data types |
Internet media type |
byte[] |
*/* |
java.lang.String |
*/* |
java.io.Reader |
*/* |
java.io.File |
*/* |
javax.activation.DataSource |
*/* |
javax.ws.rs.core.StreamingOutput |
... |