Class RollingFile

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

public class RollingFile extends File
See Also:
  • Constructor Details

    • RollingFile

      public RollingFile(String pathname, String baseName)
      Parameters:
      pathname - the base filename
      baseName - the name of the base file,
      if a filename with double "." , e.g. xxx..txt is specified, the algorithm will generate names such as xxx.000001.txt,
      if a single "." e.g. xxx.txt is specified, the algorithm will generate names such as xxx000001.txt,
  • Method Details

    • calcPos

      protected int calcPos()
      Returns:
    • readAll

      public File[] readAll()
      read all matching files from this
      Returns:
      array of all matching files
    • getFileExpression

      protected String getFileExpression()
      Returns:
    • getNewFile

      public File getNewFile()
      Returns:
      the file to write, null if error occurred
    • getNewFileName

      protected String getNewFileName()
      Returns:
      the file to write, i.e. this
    • setDigits

      public void setDigits(int digits)
      Parameters:
      digits - the digits to set