Java Byte Array Equal bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen)

Here you can find the source of bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen)

Description

bytes Equal

License

Open Source License

Declaration

public static boolean bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen) 

Method Source Code

//package com.java2s;

public class Main {

    public static boolean bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen) {
        if (aLen != bLen) {
            return false;
        }/* w w  w  .  j  ava 2 s  .co m*/
        for (int i = 0; i < aLen; i++) {
            if (a[aFrom + i] != b[bFrom + i]) {
                return false;
            }
        }
        return true;
    }
}

Related

  1. byteArrayEquals(byte[] b1, byte[] b2)
  2. byteArrayEquals(final byte[] actual, final byte[] expected)
  3. byteArrayEquals(final byte[] lhs, final byte[] rhs)
  4. bytesEqual(byte[] a, byte[] b)
  5. bytesEqual(byte[] a, byte[] b, int len)
  6. bytesEqual(byte[] a, int aOff, byte[] b, int bOff, int len)
  7. bytesEqual(byte[] a1, byte[] a2)
  8. bytesEqual(byte[] a1, byte[] a2)
  9. bytesEqual(byte[] buf1, byte[] buf2, int off, int len)