net.sf.morph.util
Class ResourceArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by net.sf.morph.util.ResourceArrayInputStream
All Implemented Interfaces:
java.io.Closeable

public class ResourceArrayInputStream
extends java.io.InputStream

Special InputStream that will concatenate the contents of a Spring Resource[]. Adapted from Apache Ant ConcatResourceInputStream.


Constructor Summary
ResourceArrayInputStream(org.springframework.core.io.Resource[] resources)
          Construct a new ResourceArrayInputStream.
 
Method Summary
 void close()
          Close the stream.
 int read()
          Read a byte.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceArrayInputStream

public ResourceArrayInputStream(org.springframework.core.io.Resource[] resources)
Construct a new ResourceArrayInputStream.

Parameters:
resources -
Method Detail

close

public void close()
           throws java.io.IOException
Close the stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException - if there is an error.

read

public int read()
         throws java.io.IOException
Read a byte.

Specified by:
read in class java.io.InputStream
Returns:
the byte (0 - 255) or -1 if this is the end of the stream.
Throws:
java.io.IOException - if there is an error.


Copyright © 2004-2008.