The im4java Library, Version 1.4.0

org.im4java.utils
Class FilenameLoader

java.lang.Object
  extended by org.im4java.utils.FilenameLoader

public class FilenameLoader
extends java.lang.Object

This utility-class loads selected filenames of a directory into a list.

Since:
1.1.0
Version:
$Revision: 1.8 $
Author:
$Author: bablokb $

Constructor Summary
FilenameLoader()
          The default constructor (no filters, no recursion).
FilenameLoader(java.io.FilenameFilter pFilter)
          Create an instance with given filter and recursion-mode
 
Method Summary
 void load(java.io.File pDir, java.util.List<java.lang.String> pNames)
          Load files in the given directory and store the results in the given list.
 java.util.List<java.lang.String> loadFilenames(java.lang.String pDir)
          Load filenames in the given directory.
 void setFilter(java.io.FilenameFilter pFilter)
          Set the filter for this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilenameLoader

public FilenameLoader()
The default constructor (no filters, no recursion).


FilenameLoader

public FilenameLoader(java.io.FilenameFilter pFilter)
Create an instance with given filter and recursion-mode

Parameters:
pFilter - The FilenameFilter to use
Method Detail

setFilter

public void setFilter(java.io.FilenameFilter pFilter)
Set the filter for this instance.

Parameters:
pFilter - The FilenameFilter to use

loadFilenames

public java.util.List<java.lang.String> loadFilenames(java.lang.String pDir)
Load filenames in the given directory.

Parameters:
pDir - The directory to search
Returns:
List of filenames

load

public void load(java.io.File pDir,
                 java.util.List<java.lang.String> pNames)
Load files in the given directory and store the results in the given list.

Parameters:
pDir - The directory to search
pNames - The result-list

The im4java Library, Version 1.4.0

Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/