BinaryWrite
[channel, b]BinaryWrite
[channel, {b1, b2, ...}]BinaryWrite
[channel, “string”]BinaryWrite
[channel, x, type]BinaryWrite
[channel, {$x_1$, $x_2$, ...}, type]BinaryWrite
[channel, {$x_1$, $x_2$, ...}, {$type_1$, $type_2$, ...}]strm = OpenWrite[BinaryFormat -> True]
BinaryWrite[strm, {39, 4, 122}]
Close[strm];
strm = OpenRead[%, BinaryFormat -> True]
BinaryRead[strm]
BinaryRead[strm, "Byte"]
BinaryRead[strm, "Character8"]
DeleteFile[Close[strm]];
Write a String
strm = OpenWrite[BinaryFormat -> True]
BinaryWrite[strm, "abc123"]
pathname = Close[%]
Read as Bytes
strm = OpenRead[%, BinaryFormat -> True]
BinaryRead[strm, {"Character8", "Character8", "Character8", "Character8", "Character8", "Character8", "Character8"}]
pathname = Close[strm]
Read as Characters
strm = OpenRead[%, BinaryFormat -> True]
BinaryRead[strm, {"Byte", "Byte", "Byte", "Byte", "Byte", "Byte", "Byte"}]
DeleteFile[Close[strm]];
Write Type
strm = OpenWrite[BinaryFormat -> True]
BinaryWrite[strm, 97, "Byte"]
BinaryWrite[strm, {97, 98, 99}, {"Byte", "Byte", "Byte"}]
DeleteFile[Close[%]];