| Modifier and Type | Field and Description |
|---|---|
private java.io.File |
file
Underlying file resource.
|
| Constructor and Description |
|---|
FileResource(java.io.File file)
Creates a new file resource.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getInputStream()
Gets an input stream around the resource.
|
java.lang.String |
toString() |
public FileResource(java.io.File file)
file - Non-null file.public java.io.InputStream getInputStream()
throws java.io.IOException
ResourceInputStream.close() unless otherwise noted.
Implementers should produce a new instance on every call to this method to provide for thread-safe usage patterns on a shared resource.
getInputStream in interface Resourcejava.io.IOException - On IO errors.public java.lang.String toString()
toString in class java.lang.Object