biz.hammurapi.util
Class ResourceAggregator

java.lang.Object
  extended by biz.hammurapi.util.ResourceAggregator

public class ResourceAggregator
extends java.lang.Object

Aggregates multiple classpath resources in one resource stream.

Author:
Pavel Vlasov

Constructor Summary
ResourceAggregator()
           
 
Method Summary
 void addResource(java.lang.String resourceName)
          Adds resource to the list of resources to be aggregated.
 void addResourceList(java.lang.String resourceListName)
          Reads each line from 'resourceListName' resource and adds to the list of resources to be aggregated.
 java.io.InputStream aggregate()
          Aggregates all resources in one resource.
static void main(java.lang.String[] args)
          Aggregates resource lists listed in command line arguments and outputs them to console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceAggregator

public ResourceAggregator()
Method Detail

addResource

public void addResource(java.lang.String resourceName)
Adds resource to the list of resources to be aggregated.

Parameters:
resourceName -

addResourceList

public void addResourceList(java.lang.String resourceListName)
                     throws java.io.IOException
Reads each line from 'resourceListName' resource and adds to the list of resources to be aggregated. Directive #include allows to include another resource list. If line has # as its first non-blank character then this line is treated as comment line.

Parameters:
resourceListName -
Throws:
java.io.IOException

aggregate

public java.io.InputStream aggregate()
                              throws java.io.IOException
Aggregates all resources in one resource.

Returns:
Aggregated input stream.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
Aggregates resource lists listed in command line arguments and outputs them to console.

Parameters:
args -


Copyright © 2003 Hammurapi Group. All Rights Reserved.