public static int toInteger(byte[] array) {
        if (array.length != 4) {
            return -1;
        }
        int ret;
        ret =
                ((NumUtil.toInt(array[3])) << 0) +
                ((NumUtil.toInt(array[2])) << 8) +
                ((NumUtil.toInt(array[1])) << 16) +
                ((NumUtil.toInt(array[0])) << 24);
        return ret;
    }