Class StreamableClassPathResource
java.lang.Object
org.apache.creadur.whisker.app.StreamableResource
org.apache.creadur.whisker.app.load.StreamableClassPathResource
Streams, on demand, the contents of a resource located on the class path.
-
Constructor Summary
ConstructorDescriptionConstructs an instance that streams the given class path resource on demand. -
Method Summary
-
Constructor Details
-
StreamableClassPathResource
Constructs an instance that streams the given class path resource on demand.- Parameters:
name
- full name including path of a resource on the class path, not null
-
-
Method Details
-
getName
Gets the location on the class path of the resource to be streamed.- Returns:
- not null
-
exists
public boolean exists()Is this resource found on the classpath?- Returns:
- true when the resource is found on the classpath, null otherwise
-
open
Opens a resource on the classpath.- Specified by:
open
in classStreamableResource
- Returns:
- not null
- Throws:
IOException
- when resource cannot be open- See Also:
-
toString
Suitable for logging.
-