Package org.conscrypt

Class ArrayUtils


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

      Constructors 
      Modifier Constructor Description
      private ArrayUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 java.lang.Object

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

      • ArrayUtils

        private ArrayUtils()
    • Method Detail

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