LazyResource
class LazyResource(resourceProvider: LazyResourceProvider, cachedSize: Long, zipEntryName: String, href: String = zipEntryName) : Resource(source)
A Resource that loads its bytes only on-demand from an EPUB file.
zipEntryName is the resource's full path within the archive and is used as the lookup key. It is kept separate from href, which the package-document reader rewrites to be relative to the OPF.
The data is loaded on the first call that requires it, and can be released via close.
Constructors
Link copied to clipboard
constructor(resourceProvider: LazyResourceProvider, cachedSize: Long, zipEntryName: String, href: String = zipEntryName)
Functions
Link copied to clipboard
Returns the resource's bytes decoded as a String using the resource's inputEncoding.