public class ClasspathResource
extends java.lang.Object
Constructor | Description |
---|---|
ClasspathResource(java.lang.String location) |
Basic constructor only allowing you to specify where to find the file.
|
ClasspathResource(java.lang.String location,
boolean preCache) |
Advanced constructor which allows you to optionally pre-cache the
data
|
ClasspathResource(java.lang.String location,
boolean preCache,
boolean isGzip) |
Advanced constructor which lets you set the preCache variable and to
force the type of file we are decompressing.
|
Modifier and Type | Method | Description |
---|---|---|
java.io.BufferedReader |
getBufferedReader() |
Returns the reader representation of this classpath resource
|
java.io.InputStream |
getInputStream() |
Returns the InputStream instance of this classpath resource
|
java.util.List<java.lang.String> |
getList() |
Returns this resource as a list of Strings
|
public ClasspathResource(java.lang.String location)
location
- Specified as my/classpath/loc.txtpublic ClasspathResource(java.lang.String location, boolean preCache)
location
- Specified as my/classpath/loc.txtpreCache
- If set to true will cause the data to be copied
to an in memory byte array and then an InputStream will be wrapped around
that.public ClasspathResource(java.lang.String location, boolean preCache, boolean isGzip)
location
- Specified as my/classpath/loc.txtpreCache
- If set to true will cause the data to be copied
to an in memory byte array and then an InputStream will be wrapped around
that.isGzip
- Set to true or false if the file is gziped.public java.io.InputStream getInputStream()
public java.io.BufferedReader getBufferedReader()
public java.util.List<java.lang.String> getList()