File stream interface, reading & writing.
More...
Inherits SystemIDisposable.
|
| virtual bool | Flush () |
| | Flush internal buffer. More...
|
| |
| virtual long | GetPosition () |
| | Get the current reading position in stream. More...
|
| |
| virtual long | GetSize () |
| | Get the current stream size, in bytes. More...
|
| |
| virtual bool | IsEOF () |
| | Determine whether reach the end of stream. More...
|
| |
| virtual bool | ReadBlock (global::System.IntPtr buffer, long offset, uint size) |
| | Read a data block from stream. More...
|
| |
| virtual uint | ReadBlock (global::System.IntPtr buffer, uint size) |
| | Read data block from stream. More...
|
| |
| virtual void | Release () |
| | Destroy the current instance. More...
|
| |
| virtual StreamCallback | Retain () |
| | Create a shared instance. More...
|
| |
| virtual bool | WriteBlock (global::System.IntPtr buffer, long offset, uint size) |
| | Write a block data into stream. More...
|
| |
File stream interface, reading & writing.
◆ Flush()
| bool foxit.common.fxcrt.StreamCallback.Flush |
( |
| ) |
|
|
inlinevirtual |
Flush internal buffer.
- Returns
- true means success, and false means failure.
◆ GetPosition()
| long foxit.common.fxcrt.StreamCallback.GetPosition |
( |
| ) |
|
|
inlinevirtual |
Get the current reading position in stream.
- Returns
- Current reading position.
◆ GetSize()
| long foxit.common.fxcrt.StreamCallback.GetSize |
( |
| ) |
|
|
inlinevirtual |
Get the current stream size, in bytes.
- Returns
- Current stream size, in bytes.
◆ IsEOF()
| bool foxit.common.fxcrt.StreamCallback.IsEOF |
( |
| ) |
|
|
inlinevirtual |
Determine whether reach the end of stream.
- Returns
- true means reach the end of stream, and false means not yet.
◆ ReadBlock() [1/2]
| bool foxit.common.fxcrt.StreamCallback.ReadBlock |
( |
global::System.IntPtr |
buffer, |
|
|
long |
offset, |
|
|
uint |
size |
|
) |
| |
|
inlinevirtual |
Read a data block from stream.
- Parameters
-
| [in,out] | buffer | Pointer to a buffer receiving data. |
| [in] | offset | Byte offset from beginning of the file, the position to read data. |
| [in] | size | Number of bytes to be read from stream. |
- Returns
- true means success, and false means failure.
◆ ReadBlock() [2/2]
| uint foxit.common.fxcrt.StreamCallback.ReadBlock |
( |
global::System.IntPtr |
buffer, |
|
|
uint |
size |
|
) |
| |
|
inlinevirtual |
Read data block from 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.
◆ Release()
| void foxit.common.fxcrt.StreamCallback.Release |
( |
| ) |
|
|
inlinevirtual |
Destroy the current instance.
- Returns
- None.
◆ Retain()
Create a shared instance.
- Returns
- File stream interface.
◆ WriteBlock()
| bool foxit.common.fxcrt.StreamCallback.WriteBlock |
( |
global::System.IntPtr |
buffer, |
|
|
long |
offset, |
|
|
uint |
size |
|
) |
| |
|
inlinevirtual |
Write a block data into stream.
- Parameters
-
| [in] | buffer | Pointer to the data block. |
| [in] | offset | Byte offset from beginning of the file, the position to write data. |
| [in] | size | The length in bytes of the buffer. |
- Returns
- true means success, and false means failure.