Foxit PDF SDK  9.1
<FSStreamCallback> Protocol Reference

File stream interface, reading & writing. More...

Inheritance diagram for <FSStreamCallback>:

Instance Methods

(BOOL) - flush
 Flush internal buffer. More...
 
(unsigned long long) - GetPosition
 Get the current reading position in stream. More...
 
(unsigned long long) - getSize
 Get the current stream size, in bytes. More...
 
(BOOL) - IsEOF
 Determine whether reach the end of stream. More...
 
(NSData *) - readBlock:size:
 Read a data block from the file. More...
 
(BOOL) - writeBlock:offset:
 Write a block data to the end of current stream. More...
 

Detailed Description

File stream interface, reading & writing.

Method Documentation

◆ flush

- (BOOL) flush
required

Flush internal buffer.

Returns
true means success, and false means failure.

◆ GetPosition

- (unsigned long long) GetPosition
required

Get the current reading position in stream.

Returns
Current reading position.

◆ getSize

- (unsigned long long) getSize
required

Get the current stream size, in bytes.

Returns
Current stream size, in bytes.

◆ IsEOF

- (BOOL) IsEOF
required

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

◆ 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
a buffer receiving read data.

◆ writeBlock:offset:

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

Write a block data to the end of current stream.

Parameters
[in]bufferPointer to the data block.
[in]sizeThe length in bytes of the buffer.
Returns
true means success, and false means failure.