Here you can find the source of loadBlackList(String blackListPath)
public static Set<String> loadBlackList(String blackListPath) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.Set; import java.util.HashSet; public class Main { public static Set<String> loadBlackList(String blackListPath) throws IOException { Set<String> blackList = new HashSet<String>(); try (BufferedReader br = new BufferedReader(new FileReader(new File(blackListPath)))) { for (String line; (line = br.readLine()) != null;) { String s = line.trim().toLowerCase(); blackList.add(s);//from w ww. jav a 2 s .c o m } } return blackList; } }