public final class XMLFilenameFilter extends Object implements FileFilter
This filter assumes that an file simply as the .xml file extension.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXTENSION
The XML extension to be used for filtering the files.
|
String |
ext
Deprecated.
will be made private in future releases
|
boolean |
ignoreCase
Set to
true to ignore the case of the extension. |
Constructor and Description |
---|
XMLFilenameFilter()
Creates a new case-insensitive XML file filter.
|
XMLFilenameFilter(boolean ignoreCase)
Creates a new XML file filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File pathname)
Tests whether or not the specified abstract pathname should be included in a pathname
list.
|
public static final String DEFAULT_EXTENSION
@Deprecated public final String ext
public final boolean ignoreCase
true
to ignore the case of the extension.public XMLFilenameFilter()
public XMLFilenameFilter(boolean ignoreCase)
ignoreCase
- true
to ignore the case of the extension.public boolean accept(File pathname) throws NullPointerException
A file is accepted if its name has a file extension matching the "xml".
accept
in interface FileFilter
pathname
- The abstract pathname to be tested;true
if and only if pathname has an extension matching "xml".NullPointerException
- If the path name is null
.Copyright © 2007-2019. All Rights Reserved.