public byte toByte() {
            return (byte) (((reserved2 & 15) << 0) | ((blockSizeValue & 7) << 4) | ((reserved3 & 1) << 7));
        }
A simple state check to ensure the stream is still open.
clients/src/main/java/org/apache/kafka/common/compress/Lz4BlockOutputStream.java