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:
Serializable,Comparable<File>
File that gets a new file whenever time and date changes
- See Also:
-
Field Summary
FieldsFields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcalcPos()Getter for format attribute.getNewFile(long t) protected Stringprotected StringgetNewFileName(long t) voidinitialization routine for a new filevoidSetter for format attribute used to format the file namesvoidsetJanitor(long seconds) Methods inherited from class org.cip4.jdflib.util.file.RollingFile
getFileExpression, getNewFile, readAll, setDigitsMethods 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 Details
-
MM
- See Also:
-
DD
- See Also:
-
DDHH
- See Also:
-
-
Constructor Details
-
RollingDateFile
- Parameters:
pathname-baseName-
-
-
Method Details
-
getJanitor
-
setJanitor
public void setJanitor(long seconds) -
getNewFileName
- Overrides:
getNewFileNamein classRollingFile- Returns:
- the file to write, i.e. this
-
getNewFileName
-
calcPos
protected int calcPos()- Overrides:
calcPosin classRollingFile- Returns:
- See Also:
-
getFormat
Getter for format attribute.- Returns:
- the format
-
setFormat
Setter for format attribute used to format the file names- Parameters:
format- the format to set
-
getNewFile
- Parameters:
t- the time in milliseconds that applies to this file- Returns:
- the file to write, null if error occurred
-
init
initialization routine for a new file- Parameters:
file-
-