com.foxit.sdk.common.fxcrt.FileReaderCallback Class Reference

File reading interface.
More...

Inheritance diagram for com.foxit.sdk.common.fxcrt.FileReaderCallback:
com.foxit.sdk.common.file.AsyncReaderCallback

Public Member Functions

int getSize ()
 Get total size of the file.
More...
 
boolean readBlock (byte[] buffer, int 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()

int 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,
int  offset,
long  size 
)

Read a data block from the file.

Parameters
[in,out]bufferPointer to a buffer receiving read data
[in]offsetByte offset from beginning of the file
[in]sizeNumber 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.