The IBinaryWriter interface contains properties and methods for writing data in the binary format.
IBinaryWriter
To write data in the binary format, initialize the stream connected with the place, to which data will be written. The following streams are available:
FileStream. The stream connected with the file on the hard drive.
MemoryStream. The stream in the computer memory.
Pass the created stream to the constructor of the BinaryWriter class. On working with the constructor the object is created that enables the user to write data in the binary format. After that it is possible to write data by using various methods of the IBinaryWriter interface. Call the Flush method to save the written data.
Property name | Brief description | |
The Stream property returns the stream for working with a binary file as a bytes sequence. |
Method name | Brief description | |
The Flush method flushes all buffers of the current recording program and calls immediate saving of all buffered data to hard drive. | ||
The WriteBoolean method writes a logical value into a binary file. | ||
The WriteChar method writes characters into a binary file. | ||
The WriteDateTime method writes variables of the DateTime type into a binary file. | ||
The WriteDouble method writes a real number into a binary file. | ||
The WriteInteger method writes an integer number into a binary file. | ||
The WriteListBegin method writes an indicator of a page start into a binary file. | ||
The WriteListEnd method writes an indicator of a page end into a binary file. | ||
The WriteString method writes a character string into a binary file. |
See also: