Class DeleteFileOnExitHook
- java.lang.Object
-
- io.netty.handler.codec.http.multipart.DeleteFileOnExitHook
-
final class DeleteFileOnExitHook extends java.lang.ObjectDeleteFileOnExitHook.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.String>FILES
-
Constructor Summary
Constructors Modifier Constructor Description privateDeleteFileOnExitHook()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
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.
-
-