public static byte[] int2Bytes(int num) {
        byte[] byteNum = new byte[4];
        for (int ix = 0; ix < 4; ++ix) {
            int offset = 32 - (ix + 1) * 8;
            byteNum[ix] = (byte) ((num >> offset) & 0xff);
        }
        return byteNum;
    }
Date: 2018/8/28
Company: www.dtstack.com
@author xuchao
core/src/main/java/com/dtstack/flink/sql/util/ByteUtils.java