FileDocCategorySizeDatePackage
Arrays.javaAPI DocAndroid 1.5 API1148Wed May 06 22:41:06 BST 2009org.bouncycastle.util

Arrays

public final class Arrays extends Object
General array utilities.

Fields Summary
Constructors Summary
private Arrays()

        // static class, hide constructor
    
Methods Summary
public static booleanareEqual(byte[] a, byte[] b)

        if (a == b)
        {
            return true;
        }
        
        if (a.length != b.length)
        {
            return false;
        }

        for (int i = 0; i != a.length; i++)
        {
            if (a[i] != b[i])
            {
                return false;
            }
        }

        return true;
    
public static voidfill(byte[] array, byte value)

        for (int i = 0; i < array.length; i++)
        {
            array[i] = value;
        }
    
public static voidfill(long[] array, long value)

        for (int i = 0; i < array.length; i++)
        {
            array[i] = value;
        }
    
public static voidfill(short[] array, short value)

        for (int i = 0; i < array.length; i++)
        {
            array[i] = value;
        }