Package org.jppf.io

Class TemporaryFileHolder

java.lang.Object
org.jppf.io.TemporaryFileHolder

public class TemporaryFileHolder extends Object
Instances of this class hold a temporary File and ensure the file is deleted when they are garbage collected.
Author:
Laurent Cohen
  • Constructor Details

    • TemporaryFileHolder

      public TemporaryFileHolder(File file)
      Initialize this file holder with the specified file.
      Parameters:
      file - the temporary file to handle.
  • Method Details

    • finalize

      protected void finalize() throws Throwable
      This method deletes the underlying file.
      Overrides:
      finalize in class Object
      Throws:
      Throwable - if an error occurs.
      See Also:
    • getFile

      public File getFile()
      Get the underlying file.
      Returns:
      a File instance.