public boolean accept(File file)
   {
		if(file.isDirectory())
			return true;
      String fileName = file.getName();
      int index = fileName.lastIndexOf('.');
      if(index > 0 && index < fileName.length() - 1)
		{   
			String extension = fileName.substring(index + 1).toLowerCase();
			if(extension.equals(ext))   
				return true;
		}   
      return false;   
	}