Examples of deleteOnExit()


Examples of java.io.File.deleteOnExit()

        File file = null;
        if (tmpdir != null)
            file = File.createTempFile("libtiff.jai.", ".dat", new File(tmpdir));
        else
            file = File.createTempFile("libtiff.jai.", ".dat");
        file.deleteOnExit();
        return file;
    }

    private void copyImageData(File tmp, OutputStream out, int total)
            throws IOException {
View Full Code Here

Examples of org.apache.axiom.attachments.lifecycle.LifecycleManager.deleteOnExit()

                           }

                           if (file != null) {
                               if(lcm!=null){
                                   try{
                                       lcm.deleteOnExit(file);
                                   }catch(Exception ex){
                                       file.deleteOnExit();
                                   }
                               }
                               else{
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.deleteOnExit()

    // create the partitions file
    FileSystem fs = FileSystem.get(job.getConfiguration());
    Path partitionsPath = new Path("/tmp", "partitions_" + UUID.randomUUID());
    fs.makeQualified(partitionsPath);
    fs.deleteOnExit(partitionsPath);
    writePartitions(job.getConfiguration(), partitionsPath, splitPoints);

    // configure job to use it
    job.setPartitionerClass(TotalOrderPartitioner.class);
    TotalOrderPartitioner.setPartitionFile(job.getConfiguration(), partitionsPath);
View Full Code Here

Examples of org.apache.hadoop.fs.LocalFileSystem.deleteOnExit()

            // LOG.info("user.dir: "+System.getProperty("user.dir"));
            // LOG.info("WorkingDirectory: "+local.getWorkingDirectory());
            // LOG.info("pathDst: " + pathDst);
            LOG.debug("copyToLocalFile: " + pathDst);
            hdfs.copyToLocalFile(pathSrc, pathDst);
            local.deleteOnExit(pathDst);
            files.append(pathDst.toUri().getPath());
          }
          first = false;
        }
      }
View Full Code Here

Examples of org.apache.hadoop.fs.RawLocalFileSystem.deleteOnExit()

    // Setup the Mapper
    WikipediaInputSplit split = new WikipediaInputSplit(new FileSplit(tmpFile, 0, fs.pathToFile(tmpFile).length(), null),0);
    AggregatingRecordReader rr = new AggregatingRecordReader();
    Path ocPath = new Path(tmpFile, "oc");
    OutputCommitter oc = new FileOutputCommitter(ocPath, context);
    fs.deleteOnExit(ocPath);
    StandaloneStatusReporter sr = new StandaloneStatusReporter();
    rr.initialize(split, context);
    MockAccumuloRecordWriter rw = new MockAccumuloRecordWriter();
    WikipediaMapper mapper = new WikipediaMapper();
   
View Full Code Here

Examples of org.apache.hadoop.fs.viewfs.ChRootedFileSystem.deleteOnExit()

    // fake that the path exists for deleteOnExit
    FileStatus stat = mock(FileStatus.class);
    when(mockFs.getFileStatus(eq(rawPath))).thenReturn(stat);
    // ensure deleteOnExit propagates the correct path
    chrootFs.deleteOnExit(chrootPath);
    chrootFs.close();
    verify(mockFs).delete(eq(rawPath), eq(true));
  }

  static class MockFileSystem extends FilterFileSystem {
View Full Code Here

Examples of org.apache.wicket.util.file.File.deleteOnExit()

  public void testFileUploadCanBeValidated() throws IOException
  {
    final Set<IValidatable> validatedComponents = new HashSet<IValidatable>();

    final File tmpFile = writeTestFile(1);
    tmpFile.deleteOnExit();

    final IValidator testValidator = new IValidator()
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

Examples of org.jboss.forge.addon.resource.DirectoryResource.deleteOnExit()

   public Project createTempProject(BuildSystem buildSystem, Iterable<Class<? extends ProjectFacet>> facetTypes)
   {
      File rootDirectory = OperatingSystemUtils.createTempDir();
      DirectoryResource addonDir = resourceFactory.create(DirectoryResource.class, rootDirectory);
      DirectoryResource projectDir = addonDir.createTempResource();
      projectDir.deleteOnExit();
      Project project = createProject(projectDir, buildSystem, facetTypes);
      return project;
   }

   @Override
View Full Code Here

Examples of org.jets3t.service.io.TempFile.deleteOnExit()

        String actionText = "";

        // Create a temporary file to hold data transformed from the original file.
        final File tempUploadFile = new TempFile(File.createTempFile("JetS3t",".tmp"));       
        tempUploadFile.deleteOnExit();
       
        // Transform data from original file, gzipping or encrypting as specified in user's options.
        OutputStream outputStream = null;
        InputStream inputStream = null;
       
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.deleteOnExit()

    if ((fs.capabilities() & FSCapability.WRITE) == 0)
            return false;
    if ((fs.capabilities() & FSCapability.DEL_ON_EXIT) == 0)
      return false
    try{
            return fs.deleteOnExit(path);
        } catch (IOException ioe) {
            return false;
        }
  }
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.