static final boolean compareBuffer ( final byte [ ] buf1 , final int offset1 , final byte [ ] buf2 , final int offset2 , final int len ) { for ( int i = 0 ; i < len ; i ++ ) { final byte b1 = buf1 [ offset1 + i ] ; final byte b2 = buf2 [ offset2 + i ] ; if ( b1 != b2 ) { return false ; } } return true ; }
Compare buffer1 and buffer2