Top Description Fields Constructors Methods
io.netty.contrib.handler.codec.http.multipart

pack-priv final Class DeleteFileOnExitHook

extends Object
Class Inheritance
Imports
java.io.File, java.util.Collections, .Set, java.util.concurrent.ConcurrentHashMap

DeleteFileOnExitHook.

Field Summary

Modifier and TypeField and Description
private static final Set<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
add(String
tmp file path
file
)

Add to the hook and clean up when the program exits.

public static boolean

Returns:

true or false
checkFileExist
(String
target file
file
)

Check in the hook files.

public static void
remove(String
tmp file path
file
)

Remove from the pool to reduce space footprint.

pack-priv static void
runHook()

Clean up all the files.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FILESback to summary
private static final Set<String> FILES

Constructor Detail

DeleteFileOnExitHookback to summary
private DeleteFileOnExitHook()

Method Detail

addback to summary
public static void add(String file)

Add to the hook and clean up when the program exits.

Parameters
file:String

tmp file path

checkFileExistback to summary
public static boolean checkFileExist(String file)

Check in the hook files.

Parameters
file:String

target file

Returns:boolean

true or false

removeback to summary
public static void remove(String file)

Remove from the pool to reduce space footprint.

Parameters
file:String

tmp file path

runHookback to summary
pack-priv static void runHook()

Clean up all the files.