public class FileInputStreamProvider extends InputStreamProvider
InputStreamProvider
using files.Constructor and Description |
---|
FileInputStreamProvider(File file)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getCurrentPath()
Returns the path about the current stream.
|
boolean |
next()
Returns whether a next
InputStream exists,
and advances the current stream to the next one. |
CountingInputStream |
openStream()
Returns the current stream.
|
public FileInputStreamProvider(File file)
file
- target file to openIllegalArgumentException
- if some parameters were null
public boolean next() throws IOException
InputStreamProvider
InputStream
exists,
and advances the current stream to the next one.
Note that the current
stream should be closed by the client.next
in class InputStreamProvider
true
if the next InputStream
exists, otherwise false
.IOException
- if failed to obtain next streampublic String getCurrentPath()
InputStreamProvider
getCurrentPath
in class InputStreamProvider
public CountingInputStream openStream() throws IOException
InputStreamProvider
openStream
in class InputStreamProvider
IOException
- if failed to obtain the current streampublic void close()
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.