Class DataSourceProvider

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.MessageBodyReader<jakarta.activation.DataSource>, jakarta.ws.rs.ext.MessageBodyWriter<jakarta.activation.DataSource>

    @Produces({"application/octet-stream","*/*"})
    @Consumes({"application/octet-stream","*/*"})
    public class DataSourceProvider
    extends AbstractMessageReaderWriterProvider<jakarta.activation.DataSource>
    Provider for marshalling/un-marshalling of application/octet-stream entity type to/from a DataSource instance.
    Author:
    Paul Sandoz, Marek Potociar
    • Constructor Detail

      • DataSourceProvider

        public DataSourceProvider()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  jakarta.ws.rs.core.MediaType mediaType)
      • readFrom

        public jakarta.activation.DataSource readFrom​(Class<jakarta.activation.DataSource> type,
                                                      Type genericType,
                                                      Annotation[] annotations,
                                                      jakarta.ws.rs.core.MediaType mediaType,
                                                      jakarta.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                                                      InputStream entityStream)
                                               throws IOException
        Throws:
        IOException
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   jakarta.ws.rs.core.MediaType mediaType)