public void writeUbyte(int value) throws IOException {
        if (value < 0 || value > 0xFF) {
            throw new ExceptionWithContext("Unsigned byte value out of range: %d", value);
        }
        write(value);
    }
@Test
    public void testWriteUbyte() throws IOException {
        writer.writeUbyte(0);
        writer.writeUbyte(1);
        writer.writeUbyte(0x12);
        writer.writeUbyte(0xFF);

        expectData(0x00, 0x01, 0x12, 0xFF);
    }