Class JsonViewMessageBodyReader

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<View>

    @Provider
    @Consumes("application/json")
    public class JsonViewMessageBodyReader
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<View>
    A MessageBodyReader for JSON.
    Author:
    Carl Harris
    • Constructor Detail

      • JsonViewMessageBodyReader

        public JsonViewMessageBodyReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> aClass,
                                  Type type,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<View>
      • readFrom

        public View readFrom​(Class<View> aClass,
                             Type type,
                             Annotation[] annotations,
                             javax.ws.rs.core.MediaType mediaType,
                             javax.ws.rs.core.MultivaluedMap<String,​String> multivaluedMap,
                             InputStream inputStream)
                      throws IOException,
                             javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<View>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException