org.opends.server.loggers
Class LogFileFilter

java.lang.Object
  extended by org.opends.server.loggers.LogFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

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

This class defines a filename filter that will be used for log files.


Constructor Summary
LogFileFilter(java.lang.String prefix)
          Create the filter with the specified file name prefix.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          Select only files that begin with the specified prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFileFilter

public LogFileFilter(java.lang.String prefix)
Create the filter with the specified file name prefix.

Parameters:
prefix - The filename prefix to use for the filter.
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Select only files that begin with the specified prefix.

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - The directory to search.
name - The filename to which to apply the filter.
Returns:
true if the given filename matches the filter, or false if it does not.