Class DeleteFileOnExitHook

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

final class DeleteFileOnExitHook extends java.lang.Object
DeleteFileOnExitHook.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final java.util.Set<java.lang.String>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    add(java.lang.String file)
    Add to the hook and clean up when the program exits.
    static boolean
    checkFileExist(java.lang.String file)
    Check in the hook files.
    static void
    remove(java.lang.String file)
    Remove from the pool to reduce space footprint.
    (package private) static void
    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.