Foxit PDF SDK

Instance Methods | List of all members
<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
  Current 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] | offset | Byte offset from beginning of the stream, the position to read data.
  [in] | size | Number of bytes to be read from stream.

Returns
  A data block read from stream.

## ◆ writeBlock:offset:()

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

Write a block data into stream.

Parameters

  [in] | data | The block data.
  [in] | offset | Byte offset from beginning of the stream, the position to write data.

Returns
  YES means success, while NO means failure.