public static boolean arraysEqual(byte[] one, byte[] two) {
        if ((one == null) && (two == null)) {
            return true;
        }
        if ((one != null) && (two == null)) {
            // log.fine("first array contains data, second doesn't");
            return false;
        }
        if ((one == null) && (two != null)) {
            // log.fine("seconds array contains data, first doesn't");
            return false;
        }
        if (one.length != two.length) {
            // log.fine("Different size: "+one.length+" !=
            // "+two.length);
            return false;
        }
        for (int i = 0; i < one.length; ++i) {
            if (one[i] != two[i]) {
                // log.fine("byte "+i+" of "+one.length+" differs:
                // "+one[i]+" != "+two[i]);
                return false;
            }
        }
        return true;
    }