Package java.io

Examples of java.io.File.deleteOnExit()


        SubTaskProgressMonitor coverMonitor = new SubTaskProgressMonitor(monitor, 5, 0);
        StringBuffer data = fax.cover.generate(fax.coverIn, coverMonitor);
        coverMonitor.done();
       
        File outputFile = File.createTempFile("jhylafax", ".ps");
        outputFile.deleteOnExit();
        OutputStream out = new FileOutputStream(outputFile);
        monitor.setText(i18n.tr("Saving cover"));
        try {
          out.write(data.toString().getBytes(FaxCover.CHARSET));
        }
View Full Code Here


  private File saveStdInToFile()
  {
    File tempFile;
    try {
      tempFile = File.createTempFile("jhylafax", null);
      tempFile.deleteOnExit();
    }
    catch (IOException e) {
      logger.debug("Error creating temporary file", e);
      ErrorDialog.showError(JHylaFAX.getInstance(),
          i18n.tr("Error creating temporary file"),
View Full Code Here

    File corpus2Folder = new File(fPluginLocation.resolve("data/performance/corpus_10-06-07"));
    File corpus3Folder = new File(fPluginLocation.resolve("data/performance/corpus_10-09-07"));
    File tmpFolder = new File(System.getProperty("java.io.tmpdir"));
    File feedFolder = new File(tmpFolder.getAbsolutePath(), "rssowlfeeds");
    feedFolder.mkdir();
    feedFolder.deleteOnExit();

    /* Copy Feeds of corpus_10-03-07 to temp location */
    copyFeedFilesToTempLocation(corpus1Folder, feedFolder);

    /* Create Filter */
 
View Full Code Here

    File corpus2Folder = new File(fPluginLocation.resolve("data/performance/corpus_10-06-07"));
    File corpus3Folder = new File(fPluginLocation.resolve("data/performance/corpus_10-09-07"));
    File tmpFolder = new File(System.getProperty("java.io.tmpdir"));
    File feedFolder = new File(tmpFolder.getAbsolutePath(), "rssowlfeeds");
    feedFolder.mkdir();
    feedFolder.deleteOnExit();

    /* Copy Feeds of corpus_10-03-07 to temp location */
    copyFeedFilesToTempLocation(corpus1Folder, feedFolder);
    List<ITask> tasks = getRealWorldReloadTasks(feedFolder.getAbsolutePath());

View Full Code Here

    FileInputStream fis = new FileInputStream(zipFile);
    ZipInputStream zin = new ZipInputStream(new BufferedInputStream(fis));
    ZipEntry entry;
    while ((entry = zin.getNextEntry()) != null) {
      File outputFile = new File(feedFolder, entry.getName());
      outputFile.deleteOnExit();

      FileOutputStream outS = new FileOutputStream(outputFile);
      copy(zin, outS);
    }
  }
View Full Code Here

        PlugInUtility.registerPlugIn(TestDemux.class.getName());
   
        MimeManager.addMimeType("test", "audio/test");
   
        File f = File.createTempFile("test", ".test");
        f.deleteOnExit();
        assertTrue(f.exists());
       
        // TODO: JMF and FMJ behave differently with unknown/missing files
       
        {
View Full Code Here

     
      File tmp = new File(System.getProperty("java.io.tmpdir"));
      File dir = new File(tmp, getClass().getSimpleName());
      tempDir = dir.toURI();
      dir.mkdirs();
      dir.deleteOnExit();
     
      count++;
   }

   protected void tearDown() throws Exception
View Full Code Here

    }
   
    public void installFromURL(URL url) {
        try {
            File tmpFile = File.createTempFile("jabref-plugin", ".jar");
            tmpFile.deleteOnExit();
            URLDownload ud = new URLDownload(frame, url, tmpFile);
            ud.download();
            String path = url.getPath();
            int pos = path.lastIndexOf('/');
            if ((pos >= 0) && (pos < path.length()-1))
View Full Code Here

    File f = null;
    // Globals.prefs.get("tempDir")
    //while ((f = File.createTempFile("jabref"+(tmpNum++), null)).exists());
    try {
      f = File.createTempFile("jabref", null);
        f.deleteOnExit();
  //System.out.println(f.getPath());
    } catch (IOException ex) {
  ex.printStackTrace();
    }
    return f;
View Full Code Here

            out.close();
        } catch (IOException ex) {
            System.err.println("Error when creating lock file");
            ex.printStackTrace();
        }
        lock.deleteOnExit();
        return false;
    }

    /**
     * Check if a lock file exists, and delete it if it does.
View Full Code Here

TOP
Copyright © 2015 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.