Class ByteUtil


  • public class ByteUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long byteArray5ToLong​(byte[] bytes, int offset)  
      static byte[] combine​(byte[]... elements)  
      static int highBitsToInt​(byte value)  
      static byte intsToByteHighAndLow​(int highValue, int lowValue)  
      static byte[] longToByteArray​(long value)  
      static byte[][] split​(byte[] input, int firstLength, int secondLength)  
      static byte[][] split​(byte[] input, int firstLength, int secondLength, int thirdLength)  
      static byte[] trim​(byte[] input, int length)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteUtil

        public ByteUtil()
    • Method Detail

      • combine

        public static byte[] combine​(byte[]... elements)
      • split

        public static byte[][] split​(byte[] input,
                                     int firstLength,
                                     int secondLength)
      • split

        public static byte[][] split​(byte[] input,
                                     int firstLength,
                                     int secondLength,
                                     int thirdLength)
                              throws java.text.ParseException
        Throws:
        java.text.ParseException
      • trim

        public static byte[] trim​(byte[] input,
                                  int length)
      • intsToByteHighAndLow

        public static byte intsToByteHighAndLow​(int highValue,
                                                int lowValue)
      • highBitsToInt

        public static int highBitsToInt​(byte value)
      • longToByteArray

        public static byte[] longToByteArray​(long value)
      • byteArray5ToLong

        public static long byteArray5ToLong​(byte[] bytes,
                                            int offset)