Class JpegDataContentHandler

    • Constructor Detail

      • JpegDataContentHandler

        public JpegDataContentHandler()
    • Method Detail

      • getContent

        public Object getContent​(DataSource ds)
        Description copied from interface: DataContentHandler
        Return an object representing the data in its most preferred form. Generally this will be the form described by the first ActivationDataFlavor returned by the getTransferDataFlavors method.
        Specified by:
        getContent in interface DataContentHandler
        Parameters:
        ds - The DataSource representing the data to be converted.
        Returns:
        The constructed Object.
      • writeTo

        public void writeTo​(Object obj,
                            String mimeType,
                            OutputStream os)
                     throws IOException
        Construct an object from a byte stream (similar semantically to previous method, we are deciding which one to support)
        Specified by:
        writeTo in interface DataContentHandler
        Parameters:
        obj - object to write
        mimeType - requested MIME type of the resulting byte stream
        os - OutputStream
        Throws:
        IOException - errors writing to the stream