Package com.aoindustries.io
Class TempFileList
- java.lang.Object
-
- com.aoindustries.io.TempFileList
-
@Deprecated public class TempFileList extends Object
Deprecated.Please useTempFileContextasFile.deleteOnExit()is prone to memory leaks in long-running applications.Manages a set of temporary files. When a context is completed, all temporary files created within that context may be deleted by calling delete on its list.For example, a context might be the lifecycle of serving one HTTP request. Once the request has been completed, any temporary files created should be cleaned-up immediately instead of waiting an indeterminate amount of time for
- Author:
- AO Industries, Inc.
- See Also:
TempFile
-
-
Constructor Summary
Constructors Constructor Description TempFileList(String prefix)Deprecated.TempFileList(String prefix, String suffix)Deprecated.TempFileList(String prefix, String suffix, File directory)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TempFilecreateTempFile()Deprecated.Creates a new temp file while adding it to the list of files that will be explicitly deleted when this list is deleted.voiddelete()Deprecated.Deletes all of the underlying temp files immediately.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
TempFileList
public TempFileList(String prefix) throws IOException
Deprecated.- Throws:
IOException
-
TempFileList
public TempFileList(String prefix, String suffix) throws IOException
Deprecated.- Throws:
IOException
-
TempFileList
public TempFileList(String prefix, String suffix, File directory) throws IOException
Deprecated.- Throws:
IOException
-
-
Method Detail
-
createTempFile
public TempFile createTempFile() throws IOException
Deprecated.Creates a new temp file while adding it to the list of files that will be explicitly deleted when this list is deleted.- Throws:
IOException
-
delete
public void delete() throws IOExceptionDeprecated.Deletes all of the underlying temp files immediately. This list may still be used for additional temp files.- Throws:
IOException- See Also:
TempFile.delete()
-
-