Class ArrayUtils


  • public class ArrayUtils
    extends java.lang.Object
    Utility class for array related functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean contains​(byte @NotNull [] src, int offset, byte @NotNull [] search)
      Helper method that checks whether a region in a byte array at a given offset contains the same as another byte array.
      • Methods inherited from class java.lang.Object

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

      • contains

        public static boolean contains​(byte @NotNull [] src,
                                       int offset,
                                       byte @NotNull [] search)
        Helper method that checks whether a region in a byte array at a given offset contains the same as another byte array. It's used by loadAllDaimoninPNGFromCollect as a replacement for the C-function strncmp() (but invocation args are a bit different).
        Parameters:
        src - source byte array
        offset - offset to start comparison
        search - byte array containing the bytes to search
        Returns:
        true if the bytes in src starting at offset are the same as those in search, otherwise false