FileDocCategorySizeDatePackage
TextChooser.javaAPI DocExample455Tue Feb 14 13:30:04 GMT 2006None

TextChooser.java

import java.io.*;

public class TextChooser implements FilenameFilter {

  public boolean accept(File dir, String name) {
 
    if (name.endsWith(".java")) return true;
    else if (name.endsWith(".jav")) return true;
    else if (name.endsWith(".html")) return true;
    else if (name.endsWith(".htm")) return true;
    else if (name.endsWith(".txt")) return true;
    else if (name.endsWith(".text")) return true;
    return false;
  }
}