org.cip4.jdflib.util.file
Class RollingDateFile

java.lang.Object
  extended by java.io.File
      extended by org.cip4.jdflib.util.file.RollingFile
          extended by 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

Author:
rainer prosi
See Also:
Serialized Form

Field Summary
static String DD
           
static String DDHH
           
 
Fields inherited from class org.cip4.jdflib.util.file.RollingFile
log
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
RollingDateFile(String pathname, String baseName)
           
 
Method Summary
protected  void calcPos()
           
 String getFormat()
          Getter for format attribute.
 File getNewFile(long t)
           
protected  String getNewFileName()
           
protected  String getNewFileName(long t)
           
 void init(File file)
          initialization routine for a new file
 void setFormat(String format)
          Setter for format attribute used to format the file names
 
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, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DD

public static final String DD
See Also:
Constant Field Values

DDHH

public static final String DDHH
See Also:
Constant Field Values
Constructor Detail

RollingDateFile

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

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 void calcPos()
Overrides:
calcPos in class RollingFile
See Also:
RollingFile.calcPos()

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 -


Copyright © 2013. All Rights Reserved.