org.opensubsystems.core.util
Class MaximumFileFilter

java.lang.Object
  extended by org.opensubsystems.core.util.MaximumFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class MaximumFileFilter
extends java.lang.Object
implements java.io.FilenameFilter

File filter implementation to retrieve at most predefined number of files which are older than specified data

Version:
$Id: MaximumFileFilter.java,v 1.4 2007/01/07 06:14:00 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.2 2004/12/18 06:18:25 bastafidli

Field Summary
protected  int m_currentFileCount
          Current number of files in list
protected  java.util.Date m_dtOlderThan
          Last modification time of file have to be before this date, if it is null, modification date is not checked
protected  int m_iMaximum
          Maximum number of files in output list
 
Constructor Summary
MaximumFileFilter(int iMax, java.util.Date dtOlderThen)
          Constructor with maximum count of file in the output list.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_currentFileCount

protected int m_currentFileCount
Current number of files in list


m_iMaximum

protected int m_iMaximum
Maximum number of files in output list


m_dtOlderThan

protected java.util.Date m_dtOlderThan
Last modification time of file have to be before this date, if it is null, modification date is not checked

Constructor Detail

MaximumFileFilter

public MaximumFileFilter(int iMax,
                         java.util.Date dtOlderThen)
Constructor with maximum count of file in the output list.

Parameters:
iMax - - maximum number of files in output list. If it is 0 length of
dtOlderThen - - file last modification time heve to by before this date, if it is null modification time is not checked output list is unlimited.
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)

Specified by:
accept in interface java.io.FilenameFilter


Copyright © 2003 - 2006 OpenSubsystems s.r.o.