public boolean accept(File file, String s)
    {
        if(wildIndex.length == 0)
            return pattern.equals(s);
        if(!s.startsWith(prefix) || !s.endsWith(suffix))
            return false;
        if(wildIndex.length == 1)
            return true;
        int i = s.length() - suffix.length();
        int j = wildIndex[0];
        int k = j;
        for(int l = 1; l < wildIndex.length; l++)
        {
            int i1 = j + 1;
            j = wildIndex[l];
            int j1 = j - i1;
            do
            {
                if(j1 + k > i)
                    return false;
                if(s.regionMatches(k, pattern, i1, j1))
                    break;
                k++;
            } while(true);
            k += j1;
        }

        return true;
    }