org.wamblee.io
Class ClassPathResource

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

public class ClassPathResource
extends Object
implements InputResource

Represents an input resource in the classpath.


Constructor Summary
ClassPathResource(String aResource)
          Construct the class path resource.
 
Method Summary
 InputStream getInputStream()
          Gets the input stream to the resource.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassPathResource

public ClassPathResource(String aResource)
Construct the class path resource.

Parameters:
aResource - Resource
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.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.