Class ArrayUtils

java.lang.Object
org.conscrypt.ArrayUtils

@Internal public final class ArrayUtils extends Object
Compatibility utility for Arrays.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static void
    checkOffsetAndCount(int arrayLength, int offset, int count)
    Checks that the range described by offset and count doesn't exceed arrayLength.
    static byte[]
    concat(byte[] a1, byte[] a2)
     
    static <T> T[]
    concat(T[] a1, T[] a2)
     
    static <T> T[]
    concatValues(T[] a1, T... values)
     
    static <T> boolean
    isEmpty(T[] array)
    Checks if given array is null or has zero elements.
    static byte[]
    reverse(byte[] array)
     
    static boolean
    startsWith(byte[] array, byte[] startsWith)
     

    Methods inherited from class Object

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

    • ArrayUtils

      private ArrayUtils()
  • Method Details

    • checkOffsetAndCount

      static void checkOffsetAndCount(int arrayLength, int offset, int count)
      Checks that the range described by offset and count doesn't exceed arrayLength.
    • concatValues

      @SafeVarargs public static <T> T[] concatValues(T[] a1, T... values)
    • concat

      public static <T> T[] concat(T[] a1, T[] a2)
    • concat

      public static byte[] concat(byte[] a1, byte[] a2)
    • startsWith

      public static boolean startsWith(byte[] array, byte[] startsWith)
    • reverse

      public static byte[] reverse(byte[] array)
    • isEmpty

      public static <T> boolean isEmpty(T[] array)
      Checks if given array is null or has zero elements.