Foxit PDF SDK
<FSFileReaderCallback> Protocol Reference
Inheritance diagram for <FSFileReaderCallback>:
<FSAsyncReaderCallback>

Instance Methods

(unsigned long long) - getSize
 Get total size of the file. More...
 
(NSData *) - readBlock:size:
 Read a data block from the file. More...
 

Detailed Description

This class represents a callback object to do file reading. All the pure virtual functions in this class are used as callback functions and should be implemented by user to do file reading in a customized way.

Method Documentation

◆ getSize()

- (unsigned long long) getSize
required

Get total size of the file.

Returns
File size, in bytes. Implementation can return 0 for any error.

◆ readBlock:size:()

- (NSData *) readBlock: (unsigned long long)  offset
size: (unsigned long long)  size 
required

Read a data block from the file.

Parameters
[in]offsetByte offset from beginning of the file
[in]sizeNumber of bytes for the block.
Returns
The read data.