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

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

public class ResourceInputStreamGenerator
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
ResourceInputStreamGenerator(java.lang.String originalName)
          Accepts the name of the 1st file loaded.
 
Method Summary
 java.io.InputStream createInputStream(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

ResourceInputStreamGenerator

public ResourceInputStreamGenerator(java.lang.String originalName)
Accepts the name of the 1st file loaded. All files generated from this generator will be relative to its location.

Method Detail

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