Class JsonBodyReader

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.MessageBodyReader<Object>

    @Provider
    public class JsonBodyReader
    extends Object
    implements jakarta.ws.rs.ext.MessageBodyReader<Object>
    Can be registered (or provided during the JAXRS scanning phase) to process Json responses.
    • Constructor Detail

      • JsonBodyReader

        public JsonBodyReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> klass,
                                  Type genericType,
                                  Annotation[] annotations,
                                  jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<Object>
      • readFrom

        public Object readFrom​(Class<Object> klass,
                               Type genericType,
                               Annotation[] annotations,
                               jakarta.ws.rs.core.MediaType mediaType,
                               jakarta.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                               InputStream bodyInputStream)
                        throws IOException,
                               jakarta.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<Object>
        Throws:
        IOException
        jakarta.ws.rs.WebApplicationException