Package com.drew.tools
Class ProcessAllImagesInFolderUtility.FileHandlerBase
- java.lang.Object
-
- com.drew.tools.ProcessAllImagesInFolderUtility.FileHandlerBase
-
- All Implemented Interfaces:
ProcessAllImagesInFolderUtility.FileHandler
- Direct Known Subclasses:
ProcessAllImagesInFolderUtility.BasicFileHandler,ProcessAllImagesInFolderUtility.MarkdownTableOutputHandler,ProcessAllImagesInFolderUtility.TextFileOutputHandler,ProcessAllImagesInFolderUtility.UnknownTagHandler
- Enclosing class:
- ProcessAllImagesInFolderUtility
abstract static class ProcessAllImagesInFolderUtility.FileHandlerBase extends java.lang.Object implements ProcessAllImagesInFolderUtility.FileHandler
-
-
Field Summary
Fields Modifier and Type Field Description private int_errorCountprivate int_exceptionCountprivate long_processedByteCountprivate int_processedFileCountprivate java.util.Set<java.lang.String>_supportedExtensions
-
Constructor Summary
Constructors Constructor Description FileHandlerBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetExtension(java.io.File file)voidonBeforeExtraction(java.io.File file, java.io.PrintStream log, java.lang.String relativePath)Called before extraction is performed onfilePath.voidonExtractionError(java.io.File file, java.lang.Throwable throwable, java.io.PrintStream log)Called when extraction onfilePathresulted in an exception.voidonExtractionSuccess(java.io.File file, Metadata metadata, java.lang.String relativePath, java.io.PrintStream log)Called when extraction onfilePathcompleted without an exception.voidonScanCompleted(java.io.PrintStream log)Called when all files have been processed.voidonStartingDirectory(java.io.File directoryPath)Called when the scan is about to start processing files in directorypath.booleanshouldProcess(java.io.File file)Called to determine whether the implementation should processfilePath.
-
-
-
Method Detail
-
onStartingDirectory
public void onStartingDirectory(java.io.File directoryPath)
Description copied from interface:ProcessAllImagesInFolderUtility.FileHandlerCalled when the scan is about to start processing files in directorypath.- Specified by:
onStartingDirectoryin interfaceProcessAllImagesInFolderUtility.FileHandler
-
shouldProcess
public boolean shouldProcess(java.io.File file)
Description copied from interface:ProcessAllImagesInFolderUtility.FileHandlerCalled to determine whether the implementation should processfilePath.- Specified by:
shouldProcessin interfaceProcessAllImagesInFolderUtility.FileHandler
-
onBeforeExtraction
public void onBeforeExtraction(java.io.File file, java.io.PrintStream log, java.lang.String relativePath)Description copied from interface:ProcessAllImagesInFolderUtility.FileHandlerCalled before extraction is performed onfilePath.- Specified by:
onBeforeExtractionin interfaceProcessAllImagesInFolderUtility.FileHandler
-
onExtractionError
public void onExtractionError(java.io.File file, java.lang.Throwable throwable, java.io.PrintStream log)Description copied from interface:ProcessAllImagesInFolderUtility.FileHandlerCalled when extraction onfilePathresulted in an exception.- Specified by:
onExtractionErrorin interfaceProcessAllImagesInFolderUtility.FileHandler
-
onExtractionSuccess
public void onExtractionSuccess(java.io.File file, Metadata metadata, java.lang.String relativePath, java.io.PrintStream log)Description copied from interface:ProcessAllImagesInFolderUtility.FileHandlerCalled when extraction onfilePathcompleted without an exception.- Specified by:
onExtractionSuccessin interfaceProcessAllImagesInFolderUtility.FileHandler
-
onScanCompleted
public void onScanCompleted(java.io.PrintStream log)
Description copied from interface:ProcessAllImagesInFolderUtility.FileHandlerCalled when all files have been processed.- Specified by:
onScanCompletedin interfaceProcessAllImagesInFolderUtility.FileHandler
-
getExtension
protected java.lang.String getExtension(java.io.File file)
-
-