org.springframework.boot.system

Class ApplicationTemp

  • java.lang.Object
    • org.springframework.boot.system.ApplicationTemp


  • public class ApplicationTemp
    extends java.lang.Object
    Provides access to an application specific temporary directory. Generally speaking different Spring Boot applications will get different locations, however, simply restarting an application will give the same location.
    Since:
    2.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.io.File getDir()
      Return the directory to be used for application specific temp files.
      java.io.File getDir(java.lang.String subDir)
      Return a sub-directory of the application temp.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ApplicationTemp

        public ApplicationTemp()
        Create a new ApplicationTemp instance.
      • ApplicationTemp

        public ApplicationTemp(java.lang.Class<?> sourceClass)
        Create a new ApplicationTemp instance for the specified source class.
        Parameters:
        sourceClass - the source class or null
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDir

        public java.io.File getDir(java.lang.String subDir)
        Return a sub-directory of the application temp.
        Parameters:
        subDir - the sub-directory name
        Returns:
        a sub-directory
      • getDir

        public java.io.File getDir()
        Return the directory to be used for application specific temp files.
        Returns:
        the application temp directory