Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.daisy.pipeline.nlp.impl.matchrules;
 
 import java.io.File;
 import java.util.List;
 
import  com.google.common.base.Charsets;
import  com.google.common.io.Files;

Match the input strings with a list of strings read from a text file.
public class WordFileMatchRule extends WordListMatchRule {
	public WordFileMatchRule(Category categoryint priorityboolean caseSensitive,
	        MatchMode matchModeboolean capitalSensitiveLocale locale) {
		super(categoryprioritycaseSensitivematchModecapitalSensitivelocale);
	}
	public void init(String filenamethrows IOException {
		List<Stringprefixes = Files.readLines(new File(filename), Charsets.UTF_8);
		super.init(prefixes);
	}
New to GrepCode? Check out our FAQ X