@Override public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { return delegate.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream); }
@Override public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { return delegate.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream); }
/** * @throws IOException if problem with reading data * @throws IllegalArgumentException if there is a parsing/eof/unrecognized property issue */ @Override public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { return super.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream); } catch (final UnrecognizedPropertyException e) { throw new IllegalArgumentException("Unrecognized property \"" + e.getPropertyName() + "\"", e); } catch (EOFException e) { throw new IllegalArgumentException("Input stream truncated", e); } catch (JsonParseException e) { throw new IllegalArgumentException("Invalid JSON input", e); } } }