286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2002,2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * Boyer-Moore searcher. 286N/A * @return -1 if <var>iterator</var> does not contain this pattern. 286N/A * @return -1 if <var>str</var> does not contain this pattern. 286N/A //System.err.println("Starts at "+index); 286N/A * @return -1 if <var>chars</char> does not contain this pattern. 286N/A //System.err.println("Starts at "+index); 286N/A public static void main(String[] argv) { 286N/A int[] shiftTable = new int[256]; 286N/A initializeBoyerMoore(argv[0], shiftTable, true); 286N/A CharacterIterator ite = new java.text.StringCharacterIterator(argv[1]); 286N/A long start = System.currentTimeMillis(); 286N/A //for (int i = 0; i < 10000; i ++) 286N/A o = searchIgnoreCasesWithBoyerMoore(ite, 0, argv[0], shiftTable); 286N/A start = System.currentTimeMillis()-start; 286N/A System.out.println("Result: "+o+", Elapsed: "+start); 286N/A } catch (Exception ex) {