diff --git a/src/org/redkale/util/Utility.java b/src/org/redkale/util/Utility.java index 0825e9e7a..7cfe4a9a9 100644 --- a/src/org/redkale/util/Utility.java +++ b/src/org/redkale/util/Utility.java @@ -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加密 *