Class JsrMessageBodyReader

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

    @Consumes({"application/json","*/json","*/*+json","*/x-json","*/javascript","*/x-javascript"})
    public class JsrMessageBodyReader
    extends Object
    implements jakarta.ws.rs.ext.MessageBodyReader<jakarta.json.JsonStructure>
    • Field Detail

      • factory

        private final jakarta.json.JsonReaderFactory factory
      • closeStream

        private final boolean closeStream
    • Constructor Detail

      • JsrMessageBodyReader

        public JsrMessageBodyReader()
      • JsrMessageBodyReader

        public JsrMessageBodyReader​(jakarta.json.JsonReaderFactory factory,
                                    boolean closeStream)
    • Method Detail

      • isReadable

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

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