public class ReliableFileInputStream extends FilterInputStream
ReliableFileOutputStream
in
Constructor and Description |
---|
ReliableFileInputStream(File file)
Constructs a new ReliableFileInputStream on the File
file . |
ReliableFileInputStream(File file,
int generation,
int openMask)
Constructs a new ReliableFileInputStream on the File
file . |
ReliableFileInputStream(String name)
Constructs a new ReliableFileInputStream on the file named
name . |
Modifier and Type | Method and Description |
---|---|
int |
available()
Override default available method.
|
void |
close()
Closes this input stream and releases any system resources associated
with the stream.
|
void |
mark(int readlimit)
Override default mark method.
|
boolean |
markSupported()
Override default markSupported method.
|
int |
read()
Override default FilterInputStream method.
|
int |
read(byte[] b)
Override default FilterInputStream method.
|
int |
read(byte[] b,
int off,
int len)
Override default FilterInputStream method.
|
void |
reset()
Override default reset method.
|
long |
skip(long n)
Override default skip method.
|
public ReliableFileInputStream(String name) throws IOException
name
. If the
file does not exist, the FileNotFoundException
is thrown.
The name
may be absolute or relative
to the System property "user.dir"
.name
- the file on which to stream reads.IOException
- If an error occurs opening the file.public ReliableFileInputStream(File file) throws IOException
file
. If the
file does not exist, the FileNotFoundException
is thrown.file
- the File on which to stream reads.IOException
- If an error occurs opening the file.public ReliableFileInputStream(File file, int generation, int openMask) throws IOException
file
. If the
file does not exist, the FileNotFoundException
is thrown.file
- the File on which to stream reads.generation
- a specific generation requested.openMask
- mask used to open data.
are invalid (corrupt, missing, etc).IOException
- If an error occurs opening the file.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
- If an error occurs closing the file.public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
FilterInputStream.read(byte[], int, int)
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
FilterInputStream.read(byte[])
public int read() throws IOException
read
in class FilterInputStream
IOException
FilterInputStream.read()
public int available() throws IOException
available
in class FilterInputStream
IOException
FilterInputStream.available()
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
FilterInputStream.skip(long)
public boolean markSupported()
markSupported
in class FilterInputStream
FilterInputStream.markSupported()
public void mark(int readlimit)
mark
in class FilterInputStream
FilterInputStream.mark(int)
public void reset() throws IOException
reset
in class FilterInputStream
IOException
FilterInputStream.reset()
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.