public class FileResource extends Object implements Resource
FileInputStream from a file.| Constructor and Description |
|---|
FileResource(File file)
Creates a new file resource.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Gets an input stream around the resource.
|
String |
toString() |
public FileResource(File file)
file - Non-null file.public InputStream getInputStream() throws 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 ResourceIOException - On IO errors.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.