public static boolean toBoolean(final byte [] b) {
        if (b.length != 1) {
            throw new IllegalArgumentException("Array has wrong size: " + b.length);
        }
        return b[0] != (byte) 0;
    }
Date: 2018/8/28
Company: www.dtstack.com
@author xuchao
core/src/main/java/com/dtstack/flink/sql/util/ByteUtils.java