private static void WriteStringVectorToFile(Vector inputVec,String fileName) throws StringVectorToFileException {
  try {
    BufferedWriter fileW=new BufferedWriter(new FileWriter(fileName));
    int lineNum=0;
    while (lineNum < inputVec.size()) {
      fileW.write((String)inputVec.elementAt(lineNum));
      fileW.newLine();
      lineNum=lineNum + 1;
    }
    ;
    fileW.close();
  }
 catch (  Exception e) {
    throw new StringVectorToFileException("Could not write file " + fileName);
  }
  ;
}

private static void WriteStringVectorToFile ( Vector inputVec , String fileName ) throws StringVectorToFileException { try { BufferedWriter fileW = new BufferedWriter ( new FileWriter ( fileName ) ) ; int lineNum = 0 ; while ( lineNum < inputVec . size ( ) ) { fileW . write ( ( String ) inputVec . elementAt ( lineNum ) ) ; fileW . newLine ( ) ; lineNum = lineNum + 1 ; } ; fileW . close ( ) ; } catch ( Exception e ) { throw new StringVectorToFileException ( "Could not write file " + fileName ) ; } ; }
methods for reading and writing files
