Class InputStreamLocator

java.lang.Object
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 Details

    • 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 Details

    • 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
      Returns:
      input stream of the source
      Throws:
      IOException - if source is not found
    • getRootDir

      protected File getRootDir()
      Returns:
      Returns the rootDir.