All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Samples.ExtensionFilter

java.lang.Object
   |
   +----Samples.ExtensionFilter

public class ExtensionFilter
extends Object
implements FilenameFilter
This class provides a filename extension filter. A file will be acceptedif its name ends with the specified extension.


Variable Index

 o extension

Constructor Index

 o ExtensionFilter(String)
Constructs an ExtensionFilter.

Method Index

 o accept(File, String)
Returns true if the filename has the specified extension, else false.

Variables

 o extension
 private String extension

Constructors

 o ExtensionFilter
 public ExtensionFilter(String extension)
Constructs an ExtensionFilter.

Parameters:
extension - a filename extension.

Methods

 o accept
 public boolean accept(File dir,
                       String name)
Returns true if the filename has the specified extension, else false.

Parameters:
dir - The directory of the file
name - The name of the file
Returns:
true if the filename has the specified extension, else false

All Packages  Class Hierarchy  This Package  Previous  Next  Index