Class DelegateProvider<T>

    • Field Detail

      • reader

        private final jakarta.ws.rs.ext.MessageBodyReader<T> reader
      • writer

        private final jakarta.ws.rs.ext.MessageBodyWriter<T> writer
    • Constructor Detail

      • DelegateProvider

        protected DelegateProvider​(jakarta.ws.rs.ext.MessageBodyReader<T> reader,
                                   jakarta.ws.rs.ext.MessageBodyWriter<T> writer)
    • Method Detail

      • isReadable

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

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

        public long getSize​(T t,
                            Class<?> rawType,
                            Type genericType,
                            Annotation[] annotations,
                            jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
      • isWriteable

        public boolean isWriteable​(Class<?> rawType,
                                   Type genericType,
                                   Annotation[] annotations,
                                   jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
      • writeTo

        public void writeTo​(T t,
                            Class<?> rawType,
                            Type genericType,
                            Annotation[] annotations,
                            jakarta.ws.rs.core.MediaType mediaType,
                            jakarta.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException
        Specified by:
        writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
        Throws:
        IOException
      • shouldThrowNoContentExceptionOnEmptyStreams

        protected boolean shouldThrowNoContentExceptionOnEmptyStreams()
      • isJaxRs2

        private static boolean isJaxRs2()