Class StreamableFileNameResource
java.lang.Object
org.apache.creadur.whisker.app.StreamableResource
org.apache.creadur.whisker.app.load.StreamableFileNameResource
Streams, on demand, the contents of a file identified by a full file name,
including path.
-
Constructor Summary
ConstructorDescriptionStreamableFileNameResource
(String fileName) Constructs an instance that streams the resource identified by name on demand. -
Method Summary
-
Constructor Details
-
StreamableFileNameResource
Constructs an instance that streams the resource identified by name on demand.- Parameters:
fileName
- full file name, including path, of the resource to be streamed on demand, not null
-
-
Method Details
-
getFileName
Gets the file name of the resource to be streamed.- Returns:
- full file name, not null
-
open
Opens the file as an input stream.- Specified by:
open
in classStreamableResource
- Returns:
- not null
- Throws:
IOException
- when resource cannot be opened- See Also:
-
toString
Suitable for logging.
-