Package net.sf.gridarta.utils
Class ArrayUtils
- java.lang.Object
-
- net.sf.gridarta.utils.ArrayUtils
-
public class ArrayUtils extends java.lang.ObjectUtility class for array related functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontains(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.
-
-
-
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 arrayoffset- offset to start comparisonsearch- byte array containing the bytes to search- Returns:
trueif the bytes insrcstarting atoffsetare the same as those insearch, otherwisefalse
-
-