Zip Resource Provider
The ZipResourceProvider is used for fetching resources from a ZIP archive. It reads ZIP archive data from a RandomAccessDataSource.
The ReadingSystemEngine uses the ZipResourceProvider class internally when you load an EPUB using a RandomAccessDataSource. You can also construct a new instance by calling one of:
When you create a ZipResourceProvider using ReadingSystemEngine.createZipResourceProvider
, the implementation will pre-calculate all byte ranges that will be used when fetching data chunks from the ZIP archive. This is a deterministic operation based on the ZipResourceProviderOptions
and the ZIP archive. ZipResourceProvider.zipArchiveInformation provides a complete list of the pre-calculated byte ranges.
Properties
Cache size in bytes
Get a list about all files in this ZIP archive.
Serialized version of zipArchiveInformation.
Information about the resource and its structure
Functions
Returns true if this ResourceProvider can handle the given relative or absolute URL.
Synchronously fetches a resource from this ResourceProvider using the provided url. The method returns when a successful response is available, or throws an exception on failure.
Synchronously fetches metadata about a resource from this ResourceProvider. The method returns when resource metadata is available, or throws an Exception on failure.