Table of contents

FileFetcher

The FileFetcher class is a utility class that partitions a multi-page image file into multiple independent ImageData objects. It inherits from the ImageSourceAdapter class.

Definition

Namespace: com.dynamsoft.utility

Inheritance: ImageSourceAdapter -> FileFetcher

public class FileFetcher extends ImageSourceAdapter

Methods

Method Description
FileFetcher Initializes a new instance of the FileFetcher class.
setFile Sets the file using a file path, file bytes or an ImageData object.
setPDFReadingParameter Sets the parameters for reading PDF files.
setPages Sets the 0-based page indexes of a file (.tiff or .pdf) for barcode searching.
hasNextImageToFetch Determines whether there are more images left to fetch.

FileFetcher

Initializes a new instance of the FileFetcher class.

FileFetcher()
FileFetcher(PDFReadingParameter pdfReadingParameter)

Parameters

pdfReadingParameter A PDFReadingParameter object with PDF files reading parameters.

See Also

PDFReadingParameter

setFile

Sets the file using a file path, file bytes or an ImageData object.

void setFile(String path) throws UtilityException
void setFile(byte[] bytes) throws UtilityException
void setFile(ImageData imageData) throws UtilityException

Parameters

path Specifies the path of the file to process.

bytes Specifies the image file bytes in memory to process.

imageData Specifies the image data to process.

Exception

UtilityException

See Also

ImageData

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

UtilityException

See Also

PDFReadingParameter

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

UtilityException

hasNextImageToFetch

Determines whether there are more images left to fetch.

boolean hasNextImageToFetch()

Return Value

Returns true if there are more images left to fetch, false otherwise.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: