Class BinaryDataSource

  • All Implemented Interfaces:
    jakarta.activation.DataSource, AutoCloseable

    public class BinaryDataSource
    extends Object
    implements jakarta.activation.DataSource, AutoCloseable
    An instance of BinaryDataSource prepares the data of a given resource for further processing and usage by a webPDF webservice call.
    • Method Detail

      • getInputStream

        @NotNull
        public @NotNull InputStream getInputStream()
                                            throws IOException
        Returns the InputStream containing the resource data represented by this data source.
        Specified by:
        getInputStream in interface jakarta.activation.DataSource
        Returns:
        The InputStream containing the resource data.
        Throws:
        IOException - Shall be thrown, should the temp File not be readable.
      • getOutputStream

        @NotNull
        public @NotNull OutputStream getOutputStream()
                                              throws IOException
        Writing to the managed resource is unsupported.
        Specified by:
        getOutputStream in interface jakarta.activation.DataSource
        Returns:
        an OutputStream
        Throws:
        IOException - Shall be thrown, should the temp File not be writable.
      • getContentType

        @NotNull
        public @NotNull String getContentType()
        Returns the MIME-type of the contained resource.
        Specified by:
        getContentType in interface jakarta.activation.DataSource
        Returns:
        The MIME-type of the contained resource.
      • getName

        @NotNull
        public @NotNull String getName()
        Returns the name of the contained resource.
        Specified by:
        getName in interface jakarta.activation.DataSource
        Returns:
        The name of the contained resource.