public final class StreamableFileResource extends StreamableResource
Constructor and Description |
---|
StreamableFileResource(File file)
Constructs an object that streams the file on demand.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
open()
Opens the file as an input stream.
|
String |
toString()
A description suitable for diagnostics.
|
public StreamableFileResource(File file)
file
- not nullpublic InputStream open() throws IOException
open
in class StreamableResource
IOException
- when resource cannot be openedStreamableResource.open()
Copyright © 2011–1970 Apache Software Foundation. All rights reserved.