Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class TempFileList extends Object
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
TempFile| Constructor and Description |
|---|
TempFileList(String prefix) |
TempFileList(String prefix,
String suffix) |
TempFileList(String prefix,
String suffix,
File directory) |
| Modifier and Type | Method and Description |
|---|---|
TempFile |
createTempFile()
Creates a new temp file while adding it to the list of files that will
be explicitely deleted when this list is deleted.
|
void |
delete()
Deletes all of the underlying temp files immediately.
|
String |
toString() |
public TempFileList(String prefix) throws IOException
IOExceptionpublic TempFileList(String prefix, String suffix) throws IOException
IOExceptionpublic TempFileList(String prefix, String suffix, File directory) throws IOException
IOExceptionpublic TempFile createTempFile() throws IOException
IOExceptionpublic void delete()
throws IOException
IOExceptionTempFile.delete()Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.