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

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

public class InputStreamLocator
extends java.lang.Object

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

Author:
Siegfried Goeschl

Constructor Summary
InputStreamLocator()
          Constructor
InputStreamLocator(java.io.File rootDir)
          Constructor
InputStreamLocator(java.io.File rootDir, org.apache.avalon.framework.logger.Logger logger)
          Constructor
 
Method Summary
protected  org.apache.avalon.framework.logger.Logger getLogger()
           
protected  java.io.File getRootDir()
           
 java.io.InputStream locate(java.lang.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(java.io.File rootDir)
Constructor

Parameters:
rootDir - the root directory to start the search

InputStreamLocator

public InputStreamLocator(java.io.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 java.io.InputStream locate(java.lang.String location)
                           throws java.io.IOException
Locate the file with the given position using the following steps

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

getLogger

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

getRootDir

protected java.io.File getRootDir()
Returns:
Returns the rootDir.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.