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.FileHandler
path
.onStartingDirectory
in interface ProcessAllImagesInFolderUtility.FileHandler
public boolean shouldProcess(java.io.File file)
ProcessAllImagesInFolderUtility.FileHandler
filePath
.shouldProcess
in interface ProcessAllImagesInFolderUtility.FileHandler
public void onBeforeExtraction(java.io.File file, java.io.PrintStream log, java.lang.String relativePath)
ProcessAllImagesInFolderUtility.FileHandler
filePath
.onBeforeExtraction
in interface ProcessAllImagesInFolderUtility.FileHandler
public void onExtractionError(java.io.File file, java.lang.Throwable throwable, java.io.PrintStream log)
ProcessAllImagesInFolderUtility.FileHandler
filePath
resulted in an exception.onExtractionError
in interface ProcessAllImagesInFolderUtility.FileHandler
public void onExtractionSuccess(java.io.File file, Metadata metadata, java.lang.String relativePath, java.io.PrintStream log)
ProcessAllImagesInFolderUtility.FileHandler
filePath
completed without an exception.onExtractionSuccess
in interface ProcessAllImagesInFolderUtility.FileHandler
public void onScanCompleted(java.io.PrintStream log)
ProcessAllImagesInFolderUtility.FileHandler
onScanCompleted
in interface ProcessAllImagesInFolderUtility.FileHandler
protected java.lang.String getExtension(java.io.File file)