/** * Write the basenameList to a file, identified by its name. * * @param fileName * fileName * @throws IOException * IOException */ public void write(String fileName) throws IOException { write(new File(fileName)); }
/** * Write the basenameList to a file, identified by its name. * * @param fileName * fileName * @throws IOException * IOException */ public void write(String fileName) throws IOException { write(new File(fileName)); }
protected void askIfSave() throws IOException { if (bnl.hasChanged()) { int answer = JOptionPane.showOptionDialog(this, "Do you want to save the list of basenames?", "Save?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null); if (answer == JOptionPane.YES_OPTION) { JFileChooser fc = new JFileChooser(); fc.setSelectedFile(new File(db.getProp(db.BASENAMEFILE))); int returnVal = fc.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { bnl.write(fc.getSelectedFile()); } } } else { System.exit(0); } }
bnl.write(basenameFilename);
public boolean compute() throws IOException, Exception { textDir = new File(db.getProp(db.TEXTDIR)); System.out.println("Computing unit features for " + bnl.getLength() + " files"); for (int i = 0; i < bnl.getLength(); i++) { percent = 100 * i / bnl.getLength(); computeFeaturesFor(bnl.getName(i)); // System.out.println( " " + bnl.getName(i) ); } bnl.write(db.getProp(db.ROOTDIR) + File.separator + "newbaselist.txt"); System.out.println("Finished computing the unit features."); return true; }
bnl.write(baseNameListFileName);