类 ArrayUtils

java.lang.Object
com.huangjian.modbus4j.sero.util.ArrayUtils

public class ArrayUtils extends Object

ArrayUtils class.

  • 构造器详细资料

    • ArrayUtils

      public ArrayUtils()
  • 方法详细资料

    • toHexString

      public static String toHexString(byte[] bytes)

      toHexString.

      参数:
      bytes - an array of
      引用无效
      byte
      objects.
      返回:
      a String object.
    • toHexString

      public static String toHexString(byte[] bytes, int start, int len)

      toHexString.

      参数:
      bytes - an array of
      引用无效
      byte
      objects.
      start - a int.
      len - a int.
      返回:
      a String object.
    • toPlainHexString

      public static String toPlainHexString(byte[] bytes)

      toPlainHexString.

      参数:
      bytes - an array of
      引用无效
      byte
      objects.
      返回:
      a String object.
    • toPlainHexString

      public static String toPlainHexString(byte[] bytes, int start, int len)

      toPlainHexString.

      参数:
      bytes - an array of
      引用无效
      byte
      objects.
      start - a int.
      len - a int.
      返回:
      a String object.
    • toString

      public static String toString(byte[] bytes)

      toString.

      参数:
      bytes - an array of
      引用无效
      byte
      objects.
      返回:
      a String object.
    • toString

      public static String toString(byte[] bytes, int start, int len)

      toString.

      参数:
      bytes - an array of
      引用无效
      byte
      objects.
      start - a int.
      len - a int.
      返回:
      a String object.
    • isEmpty

      public static boolean isEmpty(int[] value)

      isEmpty.

      参数:
      value - an array of
      引用无效
      int
      objects.
      返回:
      a boolean.
    • indexOf

      public static int indexOf(String[] values, String value)

      indexOf.

      参数:
      values - an array of String objects.
      value - a String object.
      返回:
      a int.
    • containsIgnoreCase

      public static boolean containsIgnoreCase(String[] values, String value)

      containsIgnoreCase.

      参数:
      values - an array of String objects.
      value - a String object.
      返回:
      a boolean.
    • indexOf

      public static int indexOf(byte[] src, byte[] target)

      indexOf.

      参数:
      src - an array of
      引用无效
      byte
      objects.
      target - an array of
      引用无效
      byte
      objects.
      返回:
      a int.
    • indexOf

      public static int indexOf(byte[] src, int len, byte[] target)

      indexOf.

      参数:
      src - an array of
      引用无效
      byte
      objects.
      len - a int.
      target - an array of
      引用无效
      byte
      objects.
      返回:
      a int.
    • indexOf

      public static int indexOf(byte[] src, int start, int len, byte[] target)

      indexOf.

      参数:
      src - an array of
      引用无效
      byte
      objects.
      start - a int.
      len - a int.
      target - an array of
      引用无效
      byte
      objects.
      返回:
      a int.
    • bitRangeValueLong

      public static long bitRangeValueLong(byte[] b, int offset, int length)
      Returns the value of the bits in the given range. Ranges can extend multiple bytes. No range checking is done. Invalid ranges will result in ArrayIndexOutOfBoundsException.
      参数:
      b - the array of bytes.
      offset - the location at which to begin
      length - the number of bits to include in the value.
      返回:
      the value of the bits in the range.
    • bitRangeValue

      public static int bitRangeValue(byte[] b, int offset, int length)

      bitRangeValue.

      参数:
      b - an array of
      引用无效
      byte
      objects.
      offset - a int.
      length - a int.
      返回:
      a int.
    • byteRangeValueLong

      public static long byteRangeValueLong(byte[] b, int offset, int length)

      byteRangeValueLong.

      参数:
      b - an array of
      引用无效
      byte
      objects.
      offset - a int.
      length - a int.
      返回:
      a long.
    • byteRangeValue

      public static int byteRangeValue(byte[] b, int offset, int length)

      byteRangeValue.

      参数:
      b - an array of
      引用无效
      byte
      objects.
      offset - a int.
      length - a int.
      返回:
      a int.
    • sum

      public static int sum(int[] a)

      sum.

      参数:
      a - an array of
      引用无效
      int
      objects.
      返回:
      a int.
    • toIntArray

      public static int[] toIntArray(List<Integer> list)

      toIntArray.

      参数:
      list - a List object.
      返回:
      an array of
      引用无效
      int
      objects.
    • toDoubleArray

      public static double[] toDoubleArray(List<Double> list)

      toDoubleArray.

      参数:
      list - a List object.
      返回:
      an array of
      引用无效
      double
      objects.
    • concatenate

      public static String concatenate(Object[] a, String delimiter)

      concatenate.

      参数:
      a - an array of Object objects.
      delimiter - a String object.
      返回:
      a String object.
    • shift

      public static void shift(Object[] a, int count)

      shift.

      参数:
      a - an array of Object objects.
      count - a int.