Declaration¶
Source position: objects.pp line 386
Inheritance¶
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¶
| Member | Visibility | Description |
|---|---|---|
| Close | default | Flush data and Close the file. |
| Done | default | Close the file and cleans up the instance. |
| Flush | default | FLush data from buffer, and write it to stream. |
| Init | default | Initialize an instance of TBufStream and open the file. |
| Open | default | Open the file if it is closed. |
| Read | default | Read data from the file to a buffer in memory. |
| Seek | default | Set current position in file. |
| Truncate | default | Flush buffer, and truncate the file at current position. |
| Write | default | Write data to the file from a buffer in memory. |