|
Foxit PDF RDK
|
Public Member Functions | |
| constructor (urlHeader, cacheDir, cacheOption, requestOptions< string, string >, isReadFromCache) | |
Public Member Functions inherited from ReaderCallback | |
| GetSize () | |
| Get total size of the file. More... | |
| ReadBlock (buffer, offset, size) | |
| Read a data block from the file. More... | |
| ReadBlock (offset, size) | |
| Read a data block from the file. More... | |
| Release () | |
| Called when to release everything. More... | |
The UrlFileRead class is designed to handle file reading from a specified URL with enhanced features such as local caching and custom HTTP request options. This class extends ReaderCallback, integrating callback functionality to manage asynchronous file reading operations effectively.
| UrlFileRead.constructor | ( | urlHeader | , |
| cacheDir | , | ||
| cacheOption | , | ||
| requestOptions< string, string > | , | ||
| isReadFromCache | |||
| ) |
Creates an instance of UrlFileRead to manage file reading from a URL, with options for caching and request customization.
| {string} | urlHeader - The URL header information; |
| {string} | cacheDir - The directory path where the file should be cached. If null, caching might be skipped or handled differently. |
| {CacheOption} | [cacheOption] - Optional configuration for how caching should be performed. This can include details like expiration of cache, maximum size, etc. |
| {Map<string,string>} | [requestOptions] - Optional headers or other request options that should be applied when fetching the file from the URL. |
| {boolean} | [isReadFromCache] - Optional flag indicating whether to read the file directly from cache if available, bypassing a network request. |