Foxit PDF SDK
FoxitPDFSDKPython3.StreamCallback Class Reference

File stream interface, reading & writing.
More...

Inherits FoxitPDFSDKPython3._object.

Public Member Functions

def Flush ()
 Flush internal buffer.
More...
 
def GetPosition ()
 Get the current reading position in stream.
More...
 
def GetSize ()
 Get the current stream size, in bytes.
More...
 
def IsEOF ()
 Determine whether reach the end of stream.
More...
 
def ReadBlock (buffer, offset, size)
 Read a data block from stream.
More...
 
def Release ()
 Destroy the current instance.
More...
 
def Retain ()
 Create a shared instance.
More...
 
def WriteBlock (buffer, offset, size)
 Write a block data into stream.
More...
 

Detailed Description

File stream interface, reading & writing.

Member Function Documentation

◆ Flush()

def FoxitPDFSDKPython3.StreamCallback.Flush ( )

Flush internal buffer.

Returns
true means success, and false means failure.

◆ GetPosition()

def FoxitPDFSDKPython3.StreamCallback.GetPosition ( )

Get the current reading position in stream.

Returns
Current reading position.

◆ GetSize()

def FoxitPDFSDKPython3.StreamCallback.GetSize ( )

Get the current stream size, in bytes.

Returns
Current stream size, in bytes.

◆ IsEOF()

def FoxitPDFSDKPython3.StreamCallback.IsEOF ( )

Determine whether reach the end of stream.

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

◆ ReadBlock()

def FoxitPDFSDKPython3.StreamCallback.ReadBlock (   buffer,
  offset,
  size 
)

Read a data block from stream.

Read data block from stream.

Parameters
[in,out]bufferPointer to a buffer receiving data.
[in]offsetByte offset from beginning of the file, the position to read data.
[in]sizeNumber of bytes to be read from stream.
Returns
true means success, and false means failure.
Parameters
[in,out]bufferBuffer to store data.
[in]sizeTotal size of buffer, in bytes.
Returns
The length of data stored in buffer. If returns 0, means error or no data.

◆ Release()

def FoxitPDFSDKPython3.StreamCallback.Release ( )

Destroy the current instance.

Returns
None.

◆ Retain()

def FoxitPDFSDKPython3.StreamCallback.Retain ( )

Create a shared instance.

Returns
File stream interface.

◆ WriteBlock()

def FoxitPDFSDKPython3.StreamCallback.WriteBlock (   buffer,
  offset,
  size 
)

Write a block data into stream.

Parameters
[in]bufferPointer to the data block.
[in]offsetByte offset from beginning of the file, the position to write data.
[in]sizeThe length in bytes of the buffer.
Returns
true means success, and false means failure.