Foxit PDF SDK
|
Cached file read interface. More...
Public Member Functions | |
CFX_CachedFileRead () | |
Constructor. | |
virtual | ~CFX_CachedFileRead () |
Destructor. | |
FX_BOOL | AttachFile (IFX_FileRead *pFile, FX_BOOL bTakeOver) |
Attach a file read. More... | |
virtual FX_INT64 | GetPosition () |
Get the current reading position in stream. More... | |
virtual FX_INT64 | GetSize () |
Get total size of the file. More... | |
FX_BOOL | Init (FX_INT32 nChunkSize, FX_INT32 nChunkCount, FX_LPVOID pBuffer, IFX_Allocator *pAllocator=0) |
Initialize the chunk size and chunk count. More... | |
virtual FX_BOOL | IsEOF () |
Determine whether reach the end of stream. More... | |
FX_BOOL | PreCache (FX_INT64 offset, FX_INT32 nCacheCount) |
Attach a file read. More... | |
virtual FX_BOOL | ReadBlock (void *buffer, FX_INT64 offset, size_t size) |
Read a data block from the file. More... | |
virtual size_t | ReadBlock (void *buffer, size_t size) |
Read data block from stream. More... | |
![]() | |
virtual FX_BOOL | WriteBlock (const void *buffer, size_t size) |
Write a block data to the end of current stream. More... | |
![]() | |
virtual void | ClearRange () |
Clear accessing range set by function IFX_FileRead::SetRange. More... | |
virtual FX_INT64 | SetPosition (FX_INT64 pos) |
Set the current file accessing position. More... | |
virtual FX_BOOL | SetRange (FX_INT64 offset, FX_INT64 size) |
Set accessing range. More... | |
Protected Member Functions | |
virtual FX_BOOL | Flush () |
Flush internal buffer. Unsupported for reading mode, return false directly. | |
virtual void | Release () |
Destroy the current instance. More... | |
virtual IFX_FileStream * | Retain () |
Create a shared instance. More... | |
virtual FX_BOOL | WriteBlock (const void *buffer, FX_INT64 offset, size_t size) |
Write a block data into stream. Unsupported for reading mode, return false directly. | |
Cached file read interface.