*/
private long tokenizeFile(String message, File file, boolean useReaderSource) throws Throwable {
System.out.println(message);
TokenizerSource source = null;
StandardTokenizer tokenizer = new StandardTokenizer(_properties);
try {
if (useReaderSource) {
source = new ReaderSource(file);
} else {
source = new CharArraySource(readFile(file));
}
tokenizer.setSource(source);
return tokenize(tokenizer);
} finally {
if (useReaderSource && source != null) {
((ReaderSource)source).close();
}
tokenizer.close();
}
}