Foxit PDF SDK

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

File writing interface.
More...

## Public Member Functions
boolean | flush ()
| Flush internal buffer of the file. More...
long | getSize ()
| Get total size of the file. More...
void | release ()
| Called when to release everything.
boolean | writeBlock (byte[] pData, long offset, long size)
| Write a block data. More...

## Detailed Description

File writing interface.

## Member Function Documentation

## ◆ flush()

boolean com.foxit.sdk.common.fxcrt.FileWriterCallback.flush | ( |  | ) |

Flush internal buffer of the file.

Returns
  true means success, while false means failure.

## ◆ getSize()

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

Get total size of the file.

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

## ◆ writeBlock()

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

Write a block data.

Parameters

  [in] | pData | The block data.
  [in] | offset | Byte offset from beginning of the file
  [in] | size | The length in bytes of the block data.

Returns
  true means success, while false means failure.