Interface IInputStreamSource


  • public interface IInputStreamSource
    A callback interface that provides input stream with conversion data just-in-time.
    • Method Detail

      • getInputStream

        InputStream getInputStream()
        Invoked when the converter requests a new input stream with data for conversion. If this callback throws an exception, the conversion will be marked as unsuccessful and the exception is rethrown on any invocation of the resulting future's Future.get() method.
        Returns:
        The input stream representing the conversion data.
      • onConsumed

        void onConsumed​(InputStream inputStream)
        Called when the file was consumed and is not longer required by the converter. The file must not be removed from the file system before this method is called. If this callback throws an exception, the conversion will be marked as unsuccessful and the exception is rethrown on any invocation of the resulting future's Future.get() method.
        Parameters:
        inputStream - The input stream representing the conversion data. This is not necessarily the same instance that was retrieved when getInputStream() was called.