@Override
  public Object readFrom(
      Class<Object> type,
      Type genericType,
      Annotation[] annotations,
      MediaType mediaType,
      MultivaluedMap<String, String> httpHeaders,
      InputStream entityStream)
      throws IOException,
        WebApplicationException {
    try {
      return streamer.read(gson, genericType, entityStream);
    } catch (IOException ex) {
      exceptionHandler.onRead(gson, ex);
      throw ex;
    }
  }
Creates new provider with flexible setup.
@param options options for provider
gson/src/org/immutables/gson/stream/GsonMessageBodyProvider.java