Class DeleteFileOnExitHook
java.lang.Object
io.netty.handler.codec.http.multipart.DeleteFileOnExitHook
final class DeleteFileOnExitHook
extends java.lang.Object
DeleteFileOnExitHook.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(java.lang.String file) Add to the hook and clean up when the program exits.static booleancheckFileExist(java.lang.String file) Check in the hook files.static voidremove(java.lang.String file) Remove from the pool to reduce space footprint.(package private) static voidrunHook()Clean up all the files.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
FILES
private static final java.util.Set<java.lang.String> FILES
-
-
Constructor Details
-
DeleteFileOnExitHook
private DeleteFileOnExitHook()
-
-
Method Details
-
remove
public static void remove(java.lang.String file) Remove from the pool to reduce space footprint.- Parameters:
file- tmp file path
-
add
public static void add(java.lang.String file) Add to the hook and clean up when the program exits.- Parameters:
file- tmp file path
-
checkFileExist
public static boolean checkFileExist(java.lang.String file) Check in the hook files.- Parameters:
file- target file- Returns:
- true or false
-
runHook
static void runHook()Clean up all the files.
-