Class DeleteFileOnExitHook

java.lang.Object
io.netty.handler.codec.http.multipart.DeleteFileOnExitHook

final class DeleteFileOnExitHook extends Object
DeleteFileOnExitHook.
  • Field Details

    • FILES

      private static final Set<String> FILES
  • Constructor Details

    • DeleteFileOnExitHook

      private DeleteFileOnExitHook()
  • Method Details

    • remove

      public static void remove(String file)
      Remove from the pool to reduce space footprint.
      Parameters:
      file - tmp file path
    • add

      public static void add(String file)
      Add to the hook and clean up when the program exits.
      Parameters:
      file - tmp file path
    • checkFileExist

      public static boolean checkFileExist(String file)
      Check in the hook files.
      Parameters:
      file - target file
      Returns:
      true or false
    • runHook

      static void runHook()
      Clean up all the files.