Constructor and Description |
---|
FileResource(java.lang.String resourceName,
java.io.File file) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
asInputStream()
Get the resource as an InputStream.
|
java.util.List<java.lang.String> |
asLines()
Get the resource as lines.
|
java.lang.String |
asString()
Get the resource as a String with each line separated by CRLF newline characters
\r\n . |
java.lang.String |
getResourceName()
Get the name of this Resource.
|
static java.util.List<java.lang.String> |
lines(java.io.File file) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTextResource
public FileResource(java.lang.String resourceName, java.io.File file)
public static java.util.List<java.lang.String> lines(java.io.File file) throws java.io.IOException
java.io.IOException
public java.lang.String getResourceName()
Resource
getResourceName
in interface Resource
PlanFiles
.public java.io.InputStream asInputStream() throws java.io.IOException
Resource
asInputStream
in interface Resource
java.io.IOException
- If the resource is unavailable.public java.util.List<java.lang.String> asLines() throws java.io.IOException
Resource
public java.lang.String asString() throws java.io.IOException
Resource
\r\n
.