TBufStream object
Buffered file stream.
Declaration
TBufStream = class(TDosStream)Inheritance
- TBufStream
- TDosStream
- TStream
- TObject
Descends from it: TReadBufStream TWriteBufStream
Description
Bufstream implements a buffered file stream. That is, all data written
to the stream is written to memory first. Only when the buffer is full, or
on explicit request, the data is written to disk.
Also, when reading from the stream, first the buffer is checked if there is any unread data in it. If so, this is read first. If not the buffer is filled again, and then the data is read from the buffer.
The size of the buffer is fixed and is set when constructing the file.
This is useful if you need heavy throughput for your stream, because it speeds up operations.
Methods
Init | Initialize an instance of TBufStream and open the file. | |
Done | Close the file and cleans up the instance. | |
Close | Flush data and Close the file. | |
Flush | FLush data from buffer, and write it to stream. | |
Truncate | Flush buffer, and truncate the file at current position. | |
Seek | Set current position in file. | |
Open | Open the file if it is closed. | |
Read | Read data from the file to a buffer in memory. | |
Write | Write data to the file from a buffer in memory. |
Fields
LastMode | Last file open mode. | |
BufSize | Size of buffer. | |
BufPtr | Pointer to current position in buffer. | |
BufEnd | End of data in buffer. | |
Buffer | Actual buffer. |
Inherited
From TObject (42)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
