public static Vector<String> readFileIntoVector(String filePath) throws Exception {
  Vector<String> result=new Vector<String>();
  File f=new File(filePath);
  if (!f.exists())   throw new Exception("Reader : File" + filePath + " not valid!");
  BufferedReader br=new BufferedReader(new FileReader(f));
  String line="";
  while ((line=br.readLine()) != null) {
    result.add(line);
  }
  br.close();
  return result;
}

public static Vector < String > readFileIntoVector ( String filePath ) throws Exception { Vector < String > result = new Vector < String > ( ) ; File f = new File ( filePath ) ; if ( ! f . exists ( ) ) throw new Exception ( "Reader : File" + filePath + " not valid!" ) ; BufferedReader br = new BufferedReader ( new FileReader ( f ) ) ; String line = "" ; while ( ( line = br . readLine ( ) ) != null ) { result . add ( line ) ; } br . close ( ) ; return result ; }
reads file into vector
