org.xnap.commons.io
Class FileExtensionFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.xnap.commons.io.FileExtensionFilter
All Implemented Interfaces:
FileFilter

public class FileExtensionFilter
extends FileFilter
implements FileFilter

Provides a FileFilter that accepts a certain file extension only.

Author:
Steffen Pingel

Constructor Summary
FileExtensionFilter(String description, String extension)
           
FileExtensionFilter(String description, String[] extensions)
           
 
Method Summary
 boolean accept(File file)
           
 String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileExtensionFilter

public FileExtensionFilter(String description,
                           String extension)

FileExtensionFilter

public FileExtensionFilter(String description,
                           String[] extensions)
Method Detail

accept

public boolean accept(File file)
Specified by:
accept in interface FileFilter
Specified by:
accept in class FileFilter

getDescription

public String getDescription()
Specified by:
getDescription in class FileFilter


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.