Foxit PDF SDK
<FSFileWriterCallback> Protocol Reference

Inherits <NSObject>.

Instance Methods

(BOOL) - flush
 Flush internal buffer of the file. More...
 
(unsigned long long) - getSize
 Get total size of the file. More...
 
(BOOL) - writeBlock:offset:
 Write a block data. More...
 

Detailed Description

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

Method Documentation

◆ flush()

- (BOOL) flush
required

Flush internal buffer of the file.

Returns
YES means success, while NO means failure.

◆ getSize()

- (unsigned long long) getSize
required

Get total size of the file.

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

◆ writeBlock:offset:()

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

Write a block data.

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