Here you can find the source of readAllCourseTime()
public synchronized static Vector<String> readAllCourseTime() 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> readAllCourseTime() throws IOException { File file = new File("D:\\CourseSystemDB\\Course"); String[] cla = file.list(); Vector<String> claTimeList = new Vector<String>(); String[] firstLine;/*from w ww . j a v a2s . co m*/ for (int i = 0; i < cla.length; i++) { File claFile = new File("D:\\CourseSystemDB\\Course\\" + cla[i]); BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(claFile))); firstLine = reader.readLine().split(" "); claTimeList.addElement(firstLine[2]); reader.close(); System.gc(); } return claTimeList; } }