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.
-
extension
-
-
ExtensionFilter(String)
- Constructs an ExtensionFilter.
-
accept(File, String)
- Returns true if the filename has the specified extension, else false.
extension
private String extension
ExtensionFilter
public ExtensionFilter(String extension)
- Constructs an ExtensionFilter.
- Parameters:
- extension - a filename extension.
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