Here you can find the source of loadBussinessGroupCompanies(String file_path)
public static HashSet<String> loadBussinessGroupCompanies(String file_path) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.*; import java.util.*; public class Main { public static HashSet<String> loadBussinessGroupCompanies(String file_path) throws Exception { FileInputStream fi = new FileInputStream(file_path); InputStreamReader in = new InputStreamReader(fi, "big5"); BufferedReader br = new BufferedReader(in); HashSet<String> result = new HashSet<String>(); String s = null;//from w w w. j a v a 2 s. c o m while ((s = br.readLine()) != null) { s = s.substring(s.indexOf(":") + 1, s.length()); String[] tokens = s.split(","); int i = 0; while (i < tokens.length) { if (result.contains(tokens[i])) { System.out.println(tokens[i]); } result.add(tokens[i]); i++; } } in.close(); fi.close(); return result; } }