Here you can find the source of regionMatches(byte[] subValue, byte[] superValue, int offset)
public static boolean regionMatches(byte[] subValue, byte[] superValue, int offset)
//package com.java2s; /*// w w w. j a v a 2 s. c o m * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006. * * Licensed under the Aduna BSD-style license. */ public class Main { /** * Checks whether <tt>subValue</tt> matches the region in * <tt>superValue</tt> starting at offset <tt>offset</tt>. */ public static boolean regionMatches(byte[] subValue, byte[] superValue, int offset) { for (int i = 0; i < subValue.length; i++) { if (subValue[i] != superValue[i + offset]) { return false; } } return true; } }