Foxit PDF Conversion SDK

Public Member Functions | List of all members
IFX_StreamRead Class Referenceabstract
FXCRT

Stream reading interface. More...

Inheritance diagram for IFX_StreamRead:

## Public Member Functions
virtual FX_INT64 | GetPosition ()=0
| Get the current reading position in stream. More...
virtual FX_BOOL | IsEOF ()=0
| Determine whether reach the end of stream. More...
virtual size_t | ReadBlock (void *buffer, size_t size)=0
| Read data block from sequential stream. More...
virtual void | Release ()=0
| Called when to release everything. More...
virtual FX_INT64 | SetPosition (FX_INT64 pos)
| Set the current file accessing position. More...

## Detailed Description

Stream reading interface.

## Member Function Documentation

## ◆ GetPosition()

virtual FX_INT64 IFX_StreamRead::GetPosition | ( |  | ) |
| pure virtual

Get the current reading position in stream.

Returns
  Current reading position.

Implemented in CFX_CachedFileRead, IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, and IFX_FileRead.

## ◆ IsEOF()

virtual FX_BOOL IFX_StreamRead::IsEOF | ( |  | ) |
| pure virtual

Determine whether reach the end of stream.

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

Implemented in CFX_CachedFileRead, IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, and IFX_FileRead.

## ◆ ReadBlock()

virtual size_t IFX_StreamRead::ReadBlock | ( | void * | buffer,
|  | size_t | size
| ) |  |
| pure virtual

Read data block from sequential stream.

Parameters

  [in,out] | buffer | Buffer to store data.
  [in] | size | Total size of buffer, in bytes.

Returns
  The length of data stored in buffer. If returns 0, means error or no data.

Implemented in CFX_CachedFileRead, IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, and IFX_FileRead.

## ◆ Release()

virtual void IFX_StreamRead::Release | ( |  | ) |
| pure virtual

Called when to release everything.

Returns
  None.

Implemented in CFX_CachedFileRead, IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, and IFX_FileRead.

## ◆ SetPosition()

virtual FX_INT64 IFX_StreamRead::SetPosition | ( | FX_INT64 | pos | ) |
| inline virtual

Set the current file accessing position.

Parameters

  [in] | pos | The new accessing position.

Returns
  The current file accessing position from the beginning of file. Default value:-1, means Unsupport.

Reimplemented in IFX_FileRead.