Alternative to test for files with a certain ending:


MyFilter implements FileFilter
{
public boolean accepts(File pathname)
{
if (pathname.endswith(".txt") ||...