public boolean readBoolean() throws IOException {
        byte b = readByte();
        if (b == (byte) 0) {
            return false;
        } else if (b == (byte) 1) {
            return true;
        } else {
            throw new IOException("Failed to read boolean value, expect 0 (false) or 1 (true) but we got: " + b);
        }
    }
Reads a byte as boolean. The byte value can be either 0 (false) or 1 (true).

@return boolean value
@throws IOException when failed to read boolean value from input stream or
                    reached end of the stream
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseInputStream.java