com.levigo.jadice.document.io
Class FileStreamProvider
java.lang.Object
com.levigo.jadice.document.io.FileStreamProvider
- All Implemented Interfaces:
- Provider<SeekableInputStream,IOException>
public final class FileStreamProvider
- extends Object
- implements Provider<SeekableInputStream,IOException>
A Provider
which may be used to access a local file. This class may be used in
conjunction with the Reader
and Read
APIs to provide the input.
get()
supports multiple calls and will return new independent InputStream
instances. Moreover it will generate SeekableInputStream
instances if possible.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileStreamProvider
public FileStreamProvider(File file)
- Construct a
FileStreamProvider
for the given File
.
- Parameters:
file
-
- Throws:
IllegalArgumentException
- if the file is null
get
public SeekableInputStream get()
throws IOException
- Description copied from interface:
Provider
- Provides an instance of
T
. Must never return null
. Whether this method may be
called more that one time is not specified. Supporting multiple calls is up to the
implementation.
- Specified by:
get
in interface Provider<SeekableInputStream,IOException>
- Returns:
-
- Throws:
IOException
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.