org.apache.creadur.whisker.app.load
public final class StreamableClassPathResource extends StreamableResource
Constructor and Description |
---|
StreamableClassPathResource(String name)
Constructs an instance that streams the given class path resource
on demand.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Is this resource found on the classpath?
|
String |
getName()
Gets the location on the class path of the resource to be streamed.
|
InputStream |
open()
Opens a resource on the classpath.
|
String |
toString()
Suitable for logging.
|
public StreamableClassPathResource(String name)
name
- full name including path of
a resource on the class path,
not nullpublic String getName()
public boolean exists()
public InputStream open() throws IOException
open
in class StreamableResource
IOException
- when resource cannot be openStreamableResource.open()
Copyright © 2011-2013 Apache Software Foundation. All Rights Reserved.