FileDocCategorySizeDatePackage
ExtensionFilenameFilter.javaAPI DocExample882Sun Mar 28 19:08:32 BST 1999com.macfaq.io

ExtensionFilenameFilter

public class ExtensionFilenameFilter extends Object implements FilenameFilter

Fields Summary
Vector
extensions
Constructors Summary
public ExtensionFilenameFilter(String extension)


     

    if (extension.indexOf('.") != -1) {
      extension = extension.substring(extension.lastIndexOf('.")+1);
    }
    extensions.addElement(extension);
    
  
Methods Summary
public booleanaccept(java.io.File directory, java.lang.String filename)

  
    String extension = filename.substring(filename.lastIndexOf('.")+1);
    if (extensions.contains(extension)) {
      return true;
    }
    return false;
  
public voidaddExtension(java.lang.String extension)

  
    if (extension.indexOf('.") != -1) {
      extension = extension.substring(extension.lastIndexOf('.")+1);
    }
    extensions.addElement(extension);