memcmp byte array - Android File Input Output

Android examples for File Input Output:Byte Array

Description

memcmp byte array

Demo Code


//package com.java2s;

public class Main {
    public static boolean memcmp(byte[] buffer1, byte[] buffer2, int size) {
        for (int i = 0; i < size; i++) {
            if (buffer1[i] != buffer2[i]) {
                return false;
            }/*w ww  .  ja  v  a 2s .c  o  m*/
        }

        return true;
    }
}

Related Tutorials