Android Byte Array Equal isEqual(byte[] first, byte[] second)

Here you can find the source of isEqual(byte[] first, byte[] second)

Description

is Equal

License

LGPL

Declaration

public static boolean isEqual(byte[] first, byte[] second) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static boolean isEqual(byte[] first, byte[] second) {
        boolean out = first != null && second != null
                && first.length == second.length;
        for (int i = 0; out && i < first.length; i++) {
            if (first[i] != second[i]) {
                out = false;//from ww w  .j  a  v a  2s.  com
            }
        }
        return out;
    }
}

Related

  1. equals(byte[] array1, byte[] array2, int length)
  2. equals(byte[] array1, byte[] array2, int length)
  3. equals(byte[] array1, byte[] array2, int length)
  4. equals(final byte[] pArrayA, final int pOffsetA, final byte[] pArrayB, final int pOffsetB, final int pLength)
  5. equals(final byte[] pArrayA, final int pOffsetA, final byte[] pArrayB, final int pOffsetB, final int pLength)
  6. equalByteArray(byte[] src, byte[] dst)
  7. equalByteArray(byte[] src, int srcOffset, int srcLen, byte[] dst, int dstOffset, int dstLen)
  8. equals(byte[] a1, byte[] a2)
  9. equals(byte[] array1, byte[] array2)