类 ByteUtils


  • public class ByteUtils
    extends Object
    作者:
    Allen
    • 构造器详细资料

      • ByteUtils

        public ByteUtils()
    • 方法详细资料

      • 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)