net.sourceforge.groboutils.util.io.v1
Class FileInputStreamGenerator

java.lang.Object
  extended bynet.sourceforge.groboutils.util.io.v1.FileInputStreamGenerator
All Implemented Interfaces:
IInputStreamGenerator

public class FileInputStreamGenerator
extends java.lang.Object
implements IInputStreamGenerator

A type of class which can generate a new InputStream based on just a partial name. Useful if a resource is loaded from a specific location (classpath resource, file system, URL, etc), and it references other resources which must be loaded relative to it.

Since:
0.9.1d Alpha (sometime in 2001)
Version:
$Date: 2003/02/10 22:52:45 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Constructor Summary
FileInputStreamGenerator(java.lang.String originalName)
          Accepts the name of the 1st file loaded.
 
Method Summary
 java.io.InputStream createInputStream(java.lang.String relativeName)
           
 java.io.File getFile(java.lang.String relativeName)
           
 java.lang.String getFullName(java.lang.String relativeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileInputStreamGenerator

public FileInputStreamGenerator(java.lang.String originalName)
                         throws java.io.IOException
Accepts the name of the 1st file loaded. All files generated from this generator will be relative to its location. If the name is a directory, then all relative names will be in this directory.

Method Detail

getFile

public java.io.File getFile(java.lang.String relativeName)

getFullName

public java.lang.String getFullName(java.lang.String relativeName)
Specified by:
getFullName in interface IInputStreamGenerator

createInputStream

public java.io.InputStream createInputStream(java.lang.String relativeName)
                                      throws java.io.IOException
Specified by:
createInputStream in interface IInputStreamGenerator
Throws:
java.io.IOException


Copyright © 2001-2003 by The GroboUtils Project