Foxit PDF SDK
<FSFileStreamCallback> Protocol Reference

Inherits <NSObject>.

Instance Methods

(BOOL) - flush
 Flush internal buffer. More...
 
(unsigned long long) - getSize
 Get the current stream size, in bytes. More...
 
(NSData *) - readBlock:size:
 Read a data block from stream. More...
 
(BOOL) - writeBlock:offset:
 Write a block data into stream. More...
 

Detailed Description

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

Method Documentation

◆ flush()

- (BOOL) flush
required

Flush internal buffer.

Returns
YES means success, while NO means failure.

◆ getSize()

- (unsigned long long) getSize
required

Get the current stream size, in bytes.

Returns
Stream size, in bytes.

◆ readBlock:size:()

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

Read a data block from stream.

Parameters
[in]offsetByte offset from beginning of the stream, the position to read data.
[in]sizeNumber of bytes to be read from stream.
Returns
The read read data.

◆ writeBlock:offset:()

- (BOOL) writeBlock: (NSData *)  data
offset: (unsigned long long)  offset 
required

Write a block data into stream.

Parameters
[in]dataThe block data.
[in]offsetByte offset from beginning of the stream, the position to write data.
Returns
YES means success, while NO means failure.