Package com.documents4j.api
Interface IFileSource
-
public interface IFileSourceA callback interface that provides files to be converted just-in-time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FilegetFile()Invoked when the converter requests a file for conversion.voidonConsumed(File file)Called when the file was consumed and is not longer required by the converter.
-
-
-
Method Detail
-
getFile
File getFile()
Invoked when the converter requests a file 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 file to be converted.
-
onConsumed
void onConsumed(File file)
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:
file- The file to be converted.
-
-