Class DumpFileUtils


  • public final class DumpFileUtils
    extends java.lang.Object
    Dumps a text or exception in dump file. Each call logs a date when it was written to the dump file.
    Since:
    2.20
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DumpFileUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.io.Writer createWriter​(java.io.File dumpFile)  
      static void dumpException​(java.lang.Throwable t, java.io.File dumpFile)  
      static void dumpException​(java.lang.Throwable t, java.lang.String msg, java.io.File dumpFile)  
      static void dumpText​(java.lang.String msg, java.io.File dumpFile)  
      private static boolean mkdirs​(java.io.File dumpFile)  
      static java.io.File newDumpFile​(java.io.File reportsDir, java.lang.String dumpFileName)
      New dump file.
      static java.lang.String newFormattedDateFileName()  
      • Methods inherited from class java.lang.Object

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

      • DumpFileUtils

        private DumpFileUtils()
    • Method Detail

      • newDumpFile

        public static java.io.File newDumpFile​(java.io.File reportsDir,
                                               java.lang.String dumpFileName)
        New dump file. Synchronized object appears in main memory and perfectly visible in other threads.
        Parameters:
        reportsDir - only report directory
        dumpFileName - dump file name
      • dumpException

        public static void dumpException​(java.lang.Throwable t,
                                         java.io.File dumpFile)
      • dumpException

        public static void dumpException​(java.lang.Throwable t,
                                         java.lang.String msg,
                                         java.io.File dumpFile)
      • dumpText

        public static void dumpText​(java.lang.String msg,
                                    java.io.File dumpFile)
      • newFormattedDateFileName

        public static java.lang.String newFormattedDateFileName()
      • createWriter

        private static java.io.Writer createWriter​(java.io.File dumpFile)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • mkdirs

        private static boolean mkdirs​(java.io.File dumpFile)