![JAR search and dependency download from the Maven repository](/logo.png)
com.nineya.tool.util.ByteUtil Maven / Gradle / Ivy
package com.nineya.tool.util;
public class ByteUtil {
/**
* int 值转 byte数组
* @param value
* @return
*/
public static byte[] intToBytes(int value) {
byte[] src = new byte[4];
src[0] = (byte) ((value >> 24) & 0xFF);
src[1] = (byte) ((value >> 16) & 0xFF);
src[2] = (byte) ((value >> 8) & 0xFF);
src[3] = (byte) (value & 0xFF);
return src;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy