writeByte method
Writes a single byte to the stream.
byte the byte to write (0-255)
Implementation
void writeByte(int byte) {
if (byte < 0 || byte > 255) {
throw InvalidArgumentException('Byte value must be between 0 and 255, got: $byte');
}
write([byte]);
}