org.apache.pdfbox.util
Class ExtensionFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.apache.pdfbox.util.ExtensionFileFilter

public class ExtensionFileFilter
extends FileFilter

A FileFilter that will only accept files of a certain extension.

Version:
$Revision: 1.2 $
Author:
Ben Litchfield

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

Constructor Detail

ExtensionFileFilter

public ExtensionFileFilter(String[] ext,
                           String description)
Constructor.

Parameters:
ext - A list of filename extensions, ie new String[] { "PDF"}.
description - A description of the files.
Method Detail

accept

public boolean accept(File pathname)

Specified by:
accept in class FileFilter

getDescription

public String getDescription()

Specified by:
getDescription in class FileFilter


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.