Package com.documents4j.api
Interface IInputStreamSource
-
public interface IInputStreamSourceA callback interface that provides input stream with conversion data just-in-time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamgetInputStream()Invoked when the converter requests a new input stream with data for conversion.voidonConsumed(InputStream inputStream)Called when the file was consumed and is not longer required by the converter.
-
-
-
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'sFuture.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'sFuture.get()method.- Parameters:
inputStream- The input stream representing the conversion data. This is not necessarily the same instance that was retrieved whengetInputStream()was called.
-
-