类 ByteUtils
- java.lang.Object
-
- cn.geminis.core.util.ByteUtils
-
public class ByteUtils extends Object
- 作者:
- Allen
-
-
构造器概要
构造器 构造器 说明 ByteUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static booleancompare(byte[] value1, byte[] value2)static byte[]duplicate(byte[] data, int length)static byte[]fromHex(String data)static byte[]fromInt(int value)static byte[]fromLong(long value)static byte[]fromShort(short value)static byte[]fromShortBE(short value)static byte[]fromUUID(UUID uuid)static byte[]resize(byte[] data, int length)static byte[]reverse(byte[] value)static byte[]sub(byte[] data, int from)static byte[]sub(byte[] data, int from, int length)static StringtoHex(byte[] data)static inttoInt(byte[] data)static inttoInt(byte[] data, int index)static longtoLong(byte[] data)static longtoLong(byte[] data, int index)static shorttoShort(byte[] data)static shorttoShort(byte[] data, int index)static shorttoShortBE(byte[] data)static UUIDtoUUID(byte[] bytes)
-
-
-
方法详细资料
-
duplicate
public static byte[] duplicate(byte[] data, int length)
-
resize
public static byte[] resize(byte[] data, int length)
-
compare
public static boolean compare(byte[] value1, byte[] value2)
-
fromUUID
public static byte[] fromUUID(UUID uuid)
-
toUUID
public static UUID toUUID(byte[] bytes)
-
toHex
public static String toHex(byte[] data)
-
fromHex
public static byte[] fromHex(String data)
-
sub
public static byte[] sub(byte[] data, int from, int length)
-
sub
public static byte[] sub(byte[] data, int from)
-
fromLong
public static byte[] fromLong(long value)
-
toLong
public static long toLong(byte[] data)
-
toLong
public static long toLong(byte[] data, int index)
-
fromInt
public static byte[] fromInt(int value)
-
toInt
public static int toInt(byte[] data)
-
toInt
public static int toInt(byte[] data, int index)
-
fromShort
public static byte[] fromShort(short value)
-
toShort
public static short toShort(byte[] data)
-
toShort
public static short toShort(byte[] data, int index)
-
toShortBE
public static short toShortBE(byte[] data)
-
fromShortBE
public static byte[] fromShortBE(short value)
-
reverse
public static byte[] reverse(byte[] value)
-
-