abstract static class ProcessAllImagesInFolderUtility.FileHandlerBase extends java.lang.Object implements ProcessAllImagesInFolderUtility.FileHandler
| Modifier and Type | Field and Description |
|---|---|
private int |
_errorCount |
private int |
_exceptionCount |
private long |
_processedByteCount |
private int |
_processedFileCount |
private java.util.Set<java.lang.String> |
_supportedExtensions |
| Constructor and Description |
|---|
FileHandlerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getExtension(java.io.File file) |
void |
onBeforeExtraction(java.io.File file,
java.io.PrintStream log,
java.lang.String relativePath)
Called before extraction is performed on
filePath. |
void |
onExtractionError(java.io.File file,
java.lang.Throwable throwable,
java.io.PrintStream log)
Called when extraction on
filePath resulted in an exception. |
void |
onExtractionSuccess(java.io.File file,
Metadata metadata,
java.lang.String relativePath,
java.io.PrintStream log)
Called when extraction on
filePath completed without an exception. |
void |
onScanCompleted(java.io.PrintStream log)
Called when all files have been processed.
|
void |
onStartingDirectory(java.io.File directoryPath)
Called when the scan is about to start processing files in directory
path. |
boolean |
shouldProcess(java.io.File file)
Called to determine whether the implementation should process
filePath. |
private final java.util.Set<java.lang.String> _supportedExtensions
private int _processedFileCount
private int _exceptionCount
private int _errorCount
private long _processedByteCount
public void onStartingDirectory(java.io.File directoryPath)
ProcessAllImagesInFolderUtility.FileHandlerpath.onStartingDirectory in interface ProcessAllImagesInFolderUtility.FileHandlerpublic boolean shouldProcess(java.io.File file)
ProcessAllImagesInFolderUtility.FileHandlerfilePath.shouldProcess in interface ProcessAllImagesInFolderUtility.FileHandlerpublic void onBeforeExtraction(java.io.File file,
java.io.PrintStream log,
java.lang.String relativePath)
ProcessAllImagesInFolderUtility.FileHandlerfilePath.onBeforeExtraction in interface ProcessAllImagesInFolderUtility.FileHandlerpublic void onExtractionError(java.io.File file,
java.lang.Throwable throwable,
java.io.PrintStream log)
ProcessAllImagesInFolderUtility.FileHandlerfilePath resulted in an exception.onExtractionError in interface ProcessAllImagesInFolderUtility.FileHandlerpublic void onExtractionSuccess(java.io.File file,
Metadata metadata,
java.lang.String relativePath,
java.io.PrintStream log)
ProcessAllImagesInFolderUtility.FileHandlerfilePath completed without an exception.onExtractionSuccess in interface ProcessAllImagesInFolderUtility.FileHandlerpublic void onScanCompleted(java.io.PrintStream log)
ProcessAllImagesInFolderUtility.FileHandleronScanCompleted in interface ProcessAllImagesInFolderUtility.FileHandlerprotected java.lang.String getExtension(java.io.File file)