static int findLangIndex(String lang) {
            for (int i = 0; i < CharsetRecog_8859_1.ngrams_8859_1.length; i++) {
                NGramsPlusLang ngpl = CharsetRecog_8859_1.ngrams_8859_1[i];
                if (ngpl.fLang.equals(lang)) {
                    return i;
                }
            }
            throw new IllegalArgumentException("can't find language: " + lang);
        }
@param lang language to find
@return the index into CharsetRecog_8859_1.ngrams_8859_1 that matches his language;
throws IllegalArgumentException if language can't be found
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-text-module/src/main/java/org/apache/tika/parser/txt/CharsetRecog_sbcs.java