com.dalsemi.jellybeans
Class ArrayUtils

java.lang.Object
  |
  +--com.dalsemi.jellybeans.ArrayUtils

public class ArrayUtils
extends java.lang.Object


Method Summary
static boolean arrayComp(byte[] str1, int offset1, byte[] str2, int offset2, int length)
          Quick function to compare two byte arrays.
static boolean arrayComp(char[] str1, int offset1, char[] str2, int offset2, int length)
          Deprecated.  
static void arrayCopyUnequal(java.lang.Object arr1, int offset1, java.lang.Object arr2, int offset2, int length)
          Copy the common LSBytes of one array type into another.
static void arrayFill(byte[] a, int fromIndex, int toIndex, byte val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

arrayCopyUnequal

public static void arrayCopyUnequal(java.lang.Object arr1,
                                    int offset1,
                                    java.lang.Object arr2,
                                    int offset2,
                                    int length)
Copy the common LSBytes of one array type into another. If the destination has more bytes than the source, the upper bytes are set to zero. If the destination has less bytes than the source, the upper bytes are truncated.
Parameters:
arr1 -  
offset1 -  
arr2 -  
offset2 -  
length -  
Returns:
 
See Also:

arrayComp

public static boolean arrayComp(byte[] str1,
                                int offset1,
                                byte[] str2,
                                int offset2,
                                int length)
Quick function to compare two byte arrays.
Parameters:
str1 - first array
offset1 - first array starting offset
str2 - second array
offset2 - second array starting offset
length - number of bytes to compare
Returns:
true if arrays compare favorably.
See Also:

arrayComp

public static boolean arrayComp(char[] str1,
                                int offset1,
                                char[] str2,
                                int offset2,
                                int length)
Deprecated.  
Quick function to compare a character array to a byte array. This only looks at the LSB of the character vs. the byte in the other array.
Parameters:
str1 - first array
offset1 - first array starting offset
str2 - second array
offset2 - second array starting offset
length - number of bytes to compare
Returns:
true if arrays compare favorably.
See Also:

arrayFill

public static void arrayFill(byte[] a,
                             int fromIndex,
                             int toIndex,
                             byte val)