The Binary Stream library allows the user to create an stream in a
repetition. The stream is kept in memory and can be saved in a file
and restored again.
Binary Stream allows the user to mix char/shorts/integers in a
single repetition. Alignment is handled automatically, but the
repetition contains no type information. This means that you can write
chars, and later read shorts!
Every operation updates the current position automatically.
Binary Stream has the following attributes:
Binary stream has the following exceptions:
In addition to this, the patterns save,restore,fragRestore also has
local exceptions which is also raised.
- put: appends a char at the end of the stream
- putShort: appends a short
- putLong: appends a long
- putText: appends a text
- get: reads a char at the front of the stream
- getShort: reads a short
- getLong: reads a long
- getText: reads a text, (zero terminated)
- save: stores the repetition in a file.
- restore: reads the repetition from a file. Sets position to start.
- fragRestore: Like restore, but byte 2 to 5 is the length to read.
See the Interface file for details.
|System Utilities - Reference Manual
||© 1994-2002 Mjølner Informatics
[Modified: Tuesday October 17th 2000 at 22:02]