public class ReliableFileInputStream extends FilterInputStream
ReliableFileOutputStreamin| 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 Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOException - If an error occurs closing the file.public int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionFilterInputStream.read(byte[], int, int)public int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionFilterInputStream.read(byte[])public int read()
throws IOException
read in class FilterInputStreamIOExceptionFilterInputStream.read()public int available()
throws IOException
available in class FilterInputStreamIOExceptionFilterInputStream.available()public long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionFilterInputStream.skip(long)public boolean markSupported()
markSupported in class FilterInputStreamFilterInputStream.markSupported()public void mark(int readlimit)
mark in class FilterInputStreamFilterInputStream.mark(int)public void reset()
throws IOException
reset in class FilterInputStreamIOExceptionFilterInputStream.reset()Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.