org.iges.anagram
Class Log.Rotater

java.lang.Object
  |
  +--org.iges.anagram.Log.Rotater
Enclosing class:
Log

protected class Log.Rotater
extends java.lang.Object

Produces rotating filenames either monthly, weekly, or daily.


Field Summary
protected  java.util.Calendar cal
           
protected  java.text.DateFormat fileFormat
           
protected  int frequency
           
protected  int value
           
 
Constructor Summary
protected Log.Rotater(java.lang.String frequencyString)
          Accepts either "month", "week", or "day".
 
Method Summary
protected  void check()
          Re-opens logfile if the name has rotated.
protected  int computeValue()
          Calculates the filename for the current time
protected  java.lang.String getCurrentFileName()
          Returns the most recently calculated filename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileFormat

protected java.text.DateFormat fileFormat

cal

protected java.util.Calendar cal

value

protected int value

frequency

protected int frequency
Constructor Detail

Log.Rotater

protected Log.Rotater(java.lang.String frequencyString)
               throws AnagramException
Accepts either "month", "week", or "day".

Method Detail

check

protected void check()
Re-opens logfile if the name has rotated.


computeValue

protected int computeValue()
Calculates the filename for the current time


getCurrentFileName

protected java.lang.String getCurrentFileName()
Returns the most recently calculated filename