org.apache.fulcrum.yaafi.framework.util
Class InputStreamLocator

java.lang.Object
  extended by org.apache.fulcrum.yaafi.framework.util.InputStreamLocator

public class InputStreamLocator
extends Object

Helper for locating a file name and returning an input stream.

Author:
Siegfried Goeschl

Constructor Summary
InputStreamLocator()
          Constructor
InputStreamLocator(File rootDir)
          Constructor
InputStreamLocator(File rootDir, org.apache.avalon.framework.logger.Logger logger)
          Constructor
 
Method Summary
protected  org.apache.avalon.framework.logger.Logger getLogger()
           
protected  File getRootDir()
           
 InputStream locate(String location)
          Locate the file with the given position using the following steps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamLocator

public InputStreamLocator()
Constructor


InputStreamLocator

public InputStreamLocator(File rootDir)
Constructor

Parameters:
rootDir - the root directory to start the search

InputStreamLocator

public InputStreamLocator(File rootDir,
                          org.apache.avalon.framework.logger.Logger logger)
Constructor

Parameters:
rootDir - the root directory to start the search
logger - the logger to be used
Method Detail

locate

public InputStream locate(String location)
                   throws IOException
Locate the file with the given position using the following steps

Parameters:
location - the location of the source to be loaded
Throws:
IOException

getLogger

protected org.apache.avalon.framework.logger.Logger getLogger()
Returns:
Returns the logger.

getRootDir

protected File getRootDir()
Returns:
Returns the rootDir.


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