Package org.cip4.jdflib.util.file
Class RollingDateFile
- java.lang.Object
-
- java.io.File
-
- org.cip4.jdflib.util.file.RollingFile
-
- org.cip4.jdflib.util.file.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.StringDDstatic java.lang.StringDDHHstatic java.lang.StringMM-
Fields inherited from class org.cip4.jdflib.util.file.RollingFile
log
-
-
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 intcalcPos()java.lang.StringgetFormat()Getter for format attribute.FileJanitorgetJanitor()java.io.FilegetNewFile(long t)protected java.lang.StringgetNewFileName()protected java.lang.StringgetNewFileName(long t)voidinit(java.io.File file)initialization routine for a new filevoidsetFormat(java.lang.String format)Setter for format attribute used to format the file namesvoidsetJanitor(long seconds)-
Methods inherited from class org.cip4.jdflib.util.file.RollingFile
getFileExpression, getNewFile, readAll, setDigits
-
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
-
-
-
-
Field Detail
-
MM
public static final java.lang.String MM
- See Also:
- Constant Field Values
-
DD
public static final java.lang.String DD
- See Also:
- Constant Field Values
-
DDHH
public static final java.lang.String DDHH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getJanitor
public FileJanitor getJanitor()
-
setJanitor
public void setJanitor(long seconds)
-
getNewFileName
protected java.lang.String getNewFileName()
- Overrides:
getNewFileNamein classRollingFile- Returns:
- the file to write, i.e. this
-
getNewFileName
protected java.lang.String getNewFileName(long t)
-
calcPos
protected int calcPos()
- Overrides:
calcPosin classRollingFile- Returns:
- See Also:
RollingFile.calcPos()
-
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-
-
-