Here you can find the source of readAllCoursePro()
public synchronized static Vector<String> readAllCoursePro() throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.Vector; public class Main { public synchronized static Vector<String> readAllCoursePro() throws IOException { File file = new File("D:\\CourseSystemDB\\Course"); String[] line;/* w ww. java2 s . com*/ File[] cla = file.listFiles(); Vector<String> allCourse = new Vector<String>(); for (int i = 0; i < cla.length; i++) { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(cla[i]))); String property; line = reader.readLine().split(" "); String item = line[0] + "," + line[1] + "," + line[2] + "," + line[3] + "," + line[4] + ","; line = reader.readLine().split(" "); for (int j = 1; j < line.length - 1; j++) { item = item + line[j] + ";"; } item = item + line[line.length - 1] + ","; property = reader.readLine();//temporary store course property line = reader.readLine().split(" "); for (int j = 1; j < line.length - 1; j++) { item = item + line[j] + ";"; } item = item + line[line.length - 1] + ","; line = property.split(" "); item = item + line[1] + " "; reader.close(); allCourse.add(item); } return allCourse; } }