Chapter I. Overview
In Cbuilder, there are several flow objects:
TFileStream
Tmemorystream
Tstringstream
Twinsocketstream
Tblobstream
Tolestream
Tclientblobstream
Tresourcestream
The following are the inheritance relationships of the above categories
TObject
|
Tstream
|
+---------------------------+---------------------------+--------------------+-------------------+------------+
| | | | | |
Thandlestream tcustommemorystream twinsocketstream tblobstream tolestream tstringstream
| |
TFileStream Tmemorystream
|
+-------------------------------------------+
| |
Tclientblobstream Tresourcestream
Chapter II Introduction to the properties and methods of flow objects
For more detailed syntax for each property and method see Cbuilder's Help
A Tstream Introduction
Property
Position: Current Position pointer
Size: The volume of the stream, in bytes
Method
CopyFrom: Copy data from one stream to another
READ: Reads a certain byte of data from the stream to the buffer, returns the number of bytes read
Readbuffer: Read a certain byte of data from the stream to the buffer, if incorrect, exception
Readcomponent: Remove a component from the stream
Readcomponentres: Reading a component from the stream in a Windows resource file format
Seek: The current position pointer of the position stream
SetSize: Sets the size of the stream.
Write: Writes a certain byte of data from a buffer to the stream, returning the number of bytes written
WriteBuffer: Writes a certain byte of data from the buffer into the stream, and fails the exception
Writecomponent: Writes a component to the stream
Writecomponentres: Writes a component to the stream in the form of a Windows resource file
Note: You cannot directly create a stream object of type Tstream