org.wamblee.io
Class StreamResource

java.lang.Object
  extended by org.wamblee.io.StreamResource
All Implemented Interfaces:
InputResource

public class StreamResource
extends Object
implements InputResource

Input resource based on an input stream.

Author:
Erik Brakkee

Constructor Summary
StreamResource(InputStream aStream)
          Constructs a resource.
 
Method Summary
 InputStream getInputStream()
          Gets the input stream to the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamResource

public StreamResource(InputStream aStream)
Constructs a resource.

Parameters:
aStream - Input stream to read.
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: InputResource
Gets the input stream to the resource. The obtained input stream must be closed once reading has finished.

Specified by:
getInputStream in interface InputResource
Returns:
Input stream to the resource, never null.
Throws:
IOException - in case the resource cannot be found.


Copyright © 2011. All Rights Reserved.