Class RollingDateFile

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<java.io.File>

    public class RollingDateFile
    extends RollingFile
    File that gets a new file whenever time and date changes
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DD  
      static java.lang.String DDHH  
      static java.lang.String MM  
      • Fields inherited from class java.io.File

        pathSeparator, pathSeparatorChar, separator, separatorChar
    • Constructor Summary

      Constructors 
      Constructor Description
      RollingDateFile​(java.lang.String pathname, java.lang.String baseName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int calcPos()  
      java.lang.String getFormat()
      Getter for format attribute.
      FileJanitor getJanitor()  
      java.io.File getNewFile​(long t)  
      protected java.lang.String getNewFileName()  
      protected java.lang.String getNewFileName​(long t)  
      void init​(java.io.File file)
      initialization routine for a new file
      void setFormat​(java.lang.String format)
      Setter for format attribute used to format the file names
      void setJanitor​(long seconds)  
      • Methods inherited from class java.io.File

        canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
      • Methods inherited from class java.lang.Object

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

      • RollingDateFile

        public RollingDateFile​(java.lang.String pathname,
                               java.lang.String baseName)
        Parameters:
        pathname -
        baseName -
    • Method Detail

      • setJanitor

        public void setJanitor​(long seconds)
      • getNewFileName

        protected java.lang.String getNewFileName()
        Overrides:
        getNewFileName in class RollingFile
        Returns:
        the file to write, i.e. this
      • getNewFileName

        protected java.lang.String getNewFileName​(long t)
      • getFormat

        public java.lang.String getFormat()
        Getter for format attribute.
        Returns:
        the format
      • setFormat

        public void setFormat​(java.lang.String format)
        Setter for format attribute used to format the file names
        Parameters:
        format - the format to set
      • getNewFile

        public java.io.File getNewFile​(long t)
        Parameters:
        t - the time in milliseconds that applies to this file
        Returns:
        the file to write, null if error occurred
      • init

        public void init​(java.io.File file)
        initialization routine for a new file
        Parameters:
        file -