Foxit PDF Conversion SDK

Public Member Functions | List of all members
com.foxit.sdk.common.fxcrt.FileReaderCallback Class Reference

File reading interface. More...

## Public Member Functions
long | getSize ()
| Get total size of the file. More...
boolean | readBlock (byte[] buffer, long offset, long size)
| Read a data block from the file. More...
void | release ()
| Called when to release everything. More...

## Detailed Description

File reading interface.

## Member Function Documentation

## ◆ getSize()

long com.foxit.sdk.common.fxcrt.FileReaderCallback.getSize | ( |  | ) |

Get total size of the file.

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

## ◆ readBlock()

boolean com.foxit.sdk.common.fxcrt.FileReaderCallback.readBlock | ( | byte [] | buffer,
|  | long | offset,
|  | long | size
| ) |  |

Read a data block from the file.

Parameters

  [in,out] | buffer | Pointer to a buffer receiving read data
  [in] | offset | Byte offset from beginning of the file
  [in] | size | Number of bytes for the block.

Returns
  true means success, and false means failure.

## ◆ release()

void com.foxit.sdk.common.fxcrt.FileReaderCallback.release | ( |  | ) |

Called when to release everything.

Returns
  None.