Gridarta Editor
net.sf.gridarta.utils.ArrayUtils Class Reference
+ Collaboration diagram for net.sf.gridarta.utils.ArrayUtils:

Static Public Member Functions

static boolean contains (final byte @NotNull[] src, final int offset, final byte @NotNull[] search)
 

Private Member Functions

 ArrayUtils ()
 

Detailed Description

Utility class for array related functions.

Author
Andreas Kirschbaum

Definition at line 28 of file ArrayUtils.java.

Constructor & Destructor Documentation

◆ ArrayUtils()

net.sf.gridarta.utils.ArrayUtils.ArrayUtils ( )
private

Private constructor to prevent instantiation.

Definition at line 33 of file ArrayUtils.java.

Member Function Documentation

◆ contains()

static boolean net.sf.gridarta.utils.ArrayUtils.contains ( final byte @NotNull[]  src,
final int  offset,
final byte @NotNull[]  search 
)
static

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
srcsource byte array
offsetoffset to start comparison
searchbyte 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

Definition at line 47 of file ArrayUtils.java.

Referenced by net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: