org.jppf.io
Class TemporaryFileHolder

java.lang.Object
  extended by 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 Summary
TemporaryFileHolder(File file)
          Initialize this file holder with the specified file.
 
Method Summary
protected  void finalize()
          This method deletes the underlying file.
 File getFile()
          Get the underlying file.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryFileHolder

public TemporaryFileHolder(File file)
Initialize this file holder with the specified file.

Parameters:
file - the temprary file to handle.
Method Detail

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:
Object.finalize()

getFile

public File getFile()
Get the underlying file.

Returns:
a File instance.


Copyright © 2005-2010 JPPF Team.