When dealing with non-text files, it is necessary to read bytes of the file into a string and then convert the string from the native format to the Rexx equivalent. For example, a binary number to a Rexx numeric value. This frequently leads to questions such as "how do I convert a binary floating point number into a Rexx string". It would be nice if the stream class supported reading and writing of these different values directly so that conversions are done consistently with appropriate error checking. This should support both signed and unsigned numbers in at least 8, 16, 32, and 64-bit variants. The stream should also support both big-endian and little-endian byte order. There might be other formats we might like to support, such as ASCII-Z string or length-qualified string value.
These methods should also be supported by the SocketStream class (and potentially, directly by the rxsock library).