com.stellent.cis.common.classloader
Class IsolatedJarClassLoader.TemporaryFileManager

java.lang.Object
  extended by com.stellent.cis.common.classloader.IsolatedJarClassLoader.TemporaryFileManager
Enclosing class:
IsolatedJarClassLoader

public static class IsolatedJarClassLoader.TemporaryFileManager
extends java.lang.Object


Constructor Summary
IsolatedJarClassLoader.TemporaryFileManager()
           
 
Method Summary
static java.io.File createTempFile(java.lang.String prefix, java.lang.String suffix)
          Creates a temporary file in the proper directory to allow for cleanup after execution.
static void initialize()
          Used to clean up any old temp directories found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsolatedJarClassLoader.TemporaryFileManager

public IsolatedJarClassLoader.TemporaryFileManager()
Method Detail

createTempFile

public static java.io.File createTempFile(java.lang.String prefix,
                                          java.lang.String suffix)
                                   throws java.io.IOException
Creates a temporary file in the proper directory to allow for cleanup after execution. This method delegates to File.createTempFile(java.lang.String, java.lang.String, java.io.File) so refer to it for more documentation. Any file created using this method should be considered as deleted at JVM exit; therefore, do not use this method to create files that need to be persistent between application runs.

Parameters:
prefix - the prefix string used in generating the file name; must be at least three characters long
suffix - the suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be used
Returns:
an abstract pathname denoting a newly created empty file
Throws:
java.io.IOException - if a file could not be created

initialize

public static void initialize()
Used to clean up any old temp directories found. This should be called before any calls to this class are made upon application startup.