class ClassPathResource extends java.lang.Object
A Resource implementation for resources available on the classpath.
This class also provides a staticInputStream getInputStream(String path) convenience method.
This is an internal class and its API is subject to change.
| Type | Name and description |
|---|---|
java.lang.String |
path |
| Constructor and description |
|---|
ClassPathResource
(java.lang.String path)Construct a new ClassPathResource
|
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
exists()@return true only if this resource exists and is accessible |
|
static java.io.InputStream |
getInputStream(java.lang.String path)Convenience method to open an InputStream on the specified resource path relative the classpath
|
|
java.io.InputStream |
getInputStream()Open an InputStream on the classpath resource path |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Construct a new ClassPathResource
Convenience method to open an InputStream on the specified resource path relative the classpath
Open an InputStream on the classpath resource path
Groovy Documentation