PdfFileCache class abstract

PDF file cache for downloading (Non-web).

See PdfFileCacheNative for actual implementation.

Implementers

Constructors

PdfFileCache()

Properties

blockSize int
Size of cache block in bytes.
no setter
cacheControlState → HttpCacheControlState
no setter
cachedBytes int
Number of bytes cached.
no setter
filePath String
The file path.
no setter
fileSize int
File size of the PDF file.
no setter
hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
Determine if the cache is initialized or not.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalBlocks int
Number of cache blocks.
no setter

Methods

close() Future<void>
Close the cache file.
initializeWithFileSize(int fileSize, {required bool truncateExistingContent}) Future<void>
Initialize the cache file.
invalidateCache() Future<void>
isCached(int block) bool
Check if the cache block is available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(List<int> buffer, int bufferPosition, int position, int size) Future<void>
Read size bytes from the cache to buffer (from the position).
resetAll() Future<void>
Clear all the cached data.
setBlockSize(int cacheBlockSize) bool
Set the cache block size.
setCacheControlState(HttpCacheControlState cacheControlState) Future<void>
setCached(int startBlock, {int? lastBlock}) Future<void>
Set flag to indicate that the cache block is available.
toString() String
A string representation of this object.
inherited
write(int position, List<int> bytes) Future<void>
Write bytes (of the position) to the cache.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

fromUri Future<PdfFileCache> Function(Uri uri)
Create PdfFileCache object from URI.
getter/setter pair

Constants

defaultBlockSize → const int
Default cache block size is 32KB.