public class FontFileFinder extends org.apache.commons.io.DirectoryWalker implements FontFinder
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DEPTH_LIMIT
default depth limit of recursion when searching for font files
|
Constructor and Description |
---|
FontFileFinder()
Default constructor
|
FontFileFinder(int depthLimit)
Constructor
|
Modifier and Type | Method and Description |
---|---|
List |
find()
Automagically finds a list of font files on local system
|
List |
find(String dir)
Searches a given directory for font files
|
protected static org.apache.commons.io.filefilter.IOFileFilter |
getDirectoryFilter()
Font directory filter.
|
protected static org.apache.commons.io.filefilter.IOFileFilter |
getFileFilter()
Font file filter.
|
protected boolean |
handleDirectory(File directory,
int depth,
Collection results) |
protected void |
handleDirectoryEnd(File directory,
int depth,
Collection results) |
protected void |
handleFile(File file,
int depth,
Collection results) |
public static final int DEFAULT_DEPTH_LIMIT
public FontFileFinder()
public FontFileFinder(int depthLimit)
depthLimit
- recursion depth limitprotected static org.apache.commons.io.filefilter.IOFileFilter getDirectoryFilter()
protected static org.apache.commons.io.filefilter.IOFileFilter getFileFilter()
protected boolean handleDirectory(File directory, int depth, Collection results)
handleDirectory
in class org.apache.commons.io.DirectoryWalker
directory
- directory to handledepth
- recursion depthresults
- collectionprotected void handleFile(File file, int depth, Collection results)
handleFile
in class org.apache.commons.io.DirectoryWalker
file
- file to handledepth
- recursion depthresults
- collection
protected void handleDirectoryEnd(File directory, int depth, Collection results)
handleDirectoryEnd
in class org.apache.commons.io.DirectoryWalker
directory
- the directory being processeddepth
- the current directory levelresults
- the collection of results objects
public List find() throws IOException
find
in interface FontFinder
IOException
- io exception
In case of an I/O problempublic List find(String dir) throws IOException
dir
- directory to searchIOException
- thrown if an I/O exception of some sort has occurredCopyright © 2007-2019. All Rights Reserved.