DirectoryFetcher
The DirectoryFetcher class is a utility class that retrieves a list of files from a specified directory based on certain criteria. It inherits from the ProactiveImageSourceAdapter class.
Definition
Namespace: com.dynamsoft.utility
Inheritance: ProactiveImageSourceAdapter -> DirectoryFetcher
public class DirectoryFetcher extends ProactiveImageSourceAdapter
Methods
| Method | Description |
|---|---|
DirectoryFetcher |
Initializes a new instance of the DirectoryFetcher class. |
setDirectory |
Sets the directory path and filter for the file search. |
setPDFReadingParameter |
Sets the parameters for reading PDF files. |
setPages |
Sets the 0-based page indexes of a file (.tiff or .pdf) for barcode searching. |
DirectoryFetcher
Initializes a new instance of the DirectoryFetcher class.
DirectoryFetcher()
setDirectory
Sets the directory path and filter for the file search.
void setDirectory(String filePath) throws UtilityException
void setDirectory(String filePath, String filter, boolean recursive) throws UtilityException
Parameters
filePath The path of the directory to search.
filter A string that specifies file extensions. For example: “.BMP;.JPG;.GIF”, or “.”, etc. The default value is “.bmp;.jpg;.jpeg;.tif;.png;.tiff;.gif;*.pdf”.
recursive Specifies whether to load files recursively. The default value is false.
Exception
setPDFReadingParameter
Sets the parameters for reading PDF files.
void setPDFReadingParameter(PDFReadingParameter para) throws UtilityException
Parameters
para A PDFReadingParameter object with PDF files reading parameters.
Exception
See Also
setPages
Sets the 0-based page indexes of a file (.tiff or .pdf). By default, there is no restriction on the number of pages that can be processed in a single file.
void setPages(int[] pages) throws UtilityException
Parameters
pages An integer array containing the page information to be set.
Exception