This commit is contained in:
Redkale
2020-09-25 22:03:19 +08:00
parent d5cbcaaa15
commit 72eb175dc3

View File

@@ -1656,6 +1656,22 @@ public final class Utility {
return ld.atStartOfDay(zid).toInstant().toEpochMilli();
}
/**
* 将int[]强制转换成byte[]
*
* @param value int[]
*
* @return byte[]
*/
public static byte[] intsToBytes(int[] value) {
if (value == null) return null;
byte[] bs = new byte[value.length];
for (int i = 0; i < bs.length; i++) {
bs[i] = (byte) value[i];
}
return bs;
}
/**
* MD5加密
*