Class RollingDateFile

java.lang.Object
java.io.File
org.cip4.jdflib.util.file.RollingFile
org.cip4.jdflib.util.file.RollingDateFile
All Implemented Interfaces:
Serializable, Comparable<File>

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

  • Constructor Details

    • RollingDateFile

      public RollingDateFile(String pathname, String baseName)
      Parameters:
      pathname -
      baseName -
  • Method Details

    • getJanitor

      public FileJanitor getJanitor()
    • setJanitor

      public void setJanitor(long seconds)
    • getNewFileName

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

      protected String getNewFileName(long t)
    • calcPos

      protected int calcPos()
      Overrides:
      calcPos in class RollingFile
      Returns:
      See Also:
    • getFormat

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

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

      public 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(File file)
      initialization routine for a new file
      Parameters:
      file -