Examples of deleteOnExit()


Examples of java.io.File.deleteOnExit()

    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      File tmpFile=null;
      try {
        tmpFile = File.createTempFile("WGADesignPlugin", ".wgaplugin");
        tmpFile.deleteOnExit();
        monitor.beginTask("Exporting plugin '" + _model.getPluginUniqueName() + "'.", IProgressMonitor.UNKNOWN);
        Iterator<WGARemoteServer> it = _serverList.iterator();
        while (it.hasNext()) {
          WGARemoteServer current = it.next();
          monitor.setTaskName("Exporting plugin '" + _model.getPluginUniqueName() + "' to server '" + current.getName() + "'.");
View Full Code Here

Examples of java.io.File.deleteOnExit()

    }

    @Test
    public void testLoad() throws Exception {
        File file = new File("src/test/settings.xml");
        file.deleteOnExit();
        settings = new XmlSettings();
        settings.setSettingsFile(file);

        settings.setObject("test", "this is me");
        settings.setObject("bool", true);
View Full Code Here

Examples of java.io.File.deleteOnExit()

                File file = files[i];
                if (file.isDirectory()) {
                    removeDirectoryAndChildren(file);
                } else {
                    if(!file.delete()) {
                        file.deleteOnExit();
                    }  
                }
            }
        }       
    }
View Full Code Here

Examples of java.io.File.deleteOnExit()

      if (browser != null) { 
        browser.setText(sWhatsNew);
      } else {
        try {
          File tempFile = File.createTempFile("AZU", ".html");
          tempFile.deleteOnExit();
          FileUtil.writeBytesAsFile(tempFile.getAbsolutePath(),
              sWhatsNew.getBytes("utf8"));
          Utils.launch(tempFile.getAbsolutePath());
          shell.dispose();
          return;
View Full Code Here

Examples of java.io.File.deleteOnExit()

 
 
 
  public static final void unzip(InputStream zipIn, File targetDir) throws ZipException, IOException {
    File temp = File.createTempFile("UNZIP", null);
    temp.deleteOnExit();
   
    try {
      OutputStream out = new FileOutputStream(temp);
      try {
        WGUtils.inToOut(zipIn, out, 2048);
View Full Code Here

Examples of java.io.File.deleteOnExit()

      throws IOException, MalformedURLException, URISyntaxException {
    //vfs has a problem with vdbs embedded in jars in the classpath, so we'll create a temp version
    if (vdbURL.getProtocol().equals("jar")) {
      InputStream is = vdbURL.openStream();
      File temp = File.createTempFile("temp", ".vdb", new File(UnitTestUtil.getTestScratchPath()));
      temp.deleteOnExit();
      FileUtils.write(is, temp);
      vdbURL = temp.toURI().toURL();
    }
    return new IndexMetadataFactory(vdbURL);
  }
View Full Code Here

Examples of java.io.File.deleteOnExit()

             
            }else{
             
              post_file  = AETemporaryFileHandler.createTempFile();
             
              post_file.deleteOnExit();
             
              fos  = new FileOutputStream( post_file );
             
              data_os  = fos;
            }
View Full Code Here

Examples of java.io.File.deleteOnExit()

    try {
      // Retrieve furniture library with default reader and locale
      Locale defaultLocale = Locale.getDefault();
      Locale.setDefault(DEFAULT_LOCALE);
      File furnitureLibraryFile = File.createTempFile("furniture", ".sh3f");
      furnitureLibraryFile.deleteOnExit();
      copyFile(new File(furnitureLibraryName), furnitureLibraryFile);     
      URL furnitureLibraryUrl = furnitureLibraryFile.toURI().toURL();
      String furnitureResourcesLocalDirectory = preferences.getFurnitureResourcesLocalDirectory();
      URL furnitureResourcesUrlBase = furnitureResourcesLocalDirectory != null
          ? new File(furnitureResourcesLocalDirectory).toURI().toURL()
View Full Code Here

Examples of java.io.File.deleteOnExit()

    URL url;
    try {
      url = new URL(fav);

      File temp = File.createTempFile("tvbrowser", "webplugin");
      temp.deleteOnExit();

      try {
        IOUtilities.download(url, temp);
      } catch (IOException e) {
        // could not download, ignore this error
View Full Code Here

Examples of java.io.File.deleteOnExit()

          mNotificationProgram, title, desc, program.getID());
      Icon icon = program.getChannel().getIcon();
      if (icon != null && icon instanceof ImageIcon) {
        try {
          File file = File.createTempFile("tvbrowser", ".png");
          file.deleteOnExit();
          if (IOUtilities.writeImageIconToFile((ImageIcon) icon, "png", file)) {
            notification.setIcon(file.getAbsolutePath());
          }
        } catch (IOException e) {
          e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 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.