public class NfsFileInputStream
extends java.io.InputStream
java.io.FileInputStream.| Modifier and Type | Field and Description |
|---|---|
static int |
EOF
Constant for output.
|
| Constructor and Description |
|---|
NfsFileInputStream(NfsFile<?,?> nfsFile)
Creates a
NfsFileInputStream by opening a connection to an
actual NFS file, starting to read at offset 0 and using the preferred
buffer size as the maximums. |
NfsFileInputStream(NfsFile<?,?> nfsFile,
int maximumBufferSize)
Creates a
NfsFileInputStream by opening a connection to an
actual NFS file, starting to read at offset 0 and using the specified
maximum buffer size. |
NfsFileInputStream(NfsFile<?,?> nfsFile,
long offset,
int maximumBufferSize)
Creates a
NfsFileInputStream by opening a connection to an
actual NFS file, using the specified offset and
maximumBufferSize. |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long bytesToSkip) |
public static final int EOF
public NfsFileInputStream(NfsFile<?,?> nfsFile, long offset, int maximumBufferSize) throws java.io.IOException
NfsFileInputStream by opening a connection to an
actual NFS file, using the specified offset and
maximumBufferSize.
If the named file does not exist, is a directory rather than a regular
file, or for some other reason cannot be opened for reading then a
FileNotFoundException is thrown.
nfsFile - The NFS file instance to be read.offset - The offset at which reading should start, in bytes.maximumBufferSize - The maximum buffer size to use in bytes.java.io.IOException - If the file does not exist, is a directory rather than a
regular file, or for some other reason cannot be opened for
reading.public NfsFileInputStream(NfsFile<?,?> nfsFile, int maximumBufferSize) throws java.io.IOException
NfsFileInputStream by opening a connection to an
actual NFS file, starting to read at offset 0 and using the specified
maximum buffer size.
If the named file does not exist, is a directory rather than a regular
file, or for some other reason cannot be opened for reading then a
FileNotFoundException is thrown.
nfsFile - The NFS file instance to be read.maximumBufferSize - The maximum buffer size to use in bytes.java.io.IOException - If the file does not exist, is a directory rather than a
regular file, or for some other reason cannot be opened for
reading.public NfsFileInputStream(NfsFile<?,?> nfsFile) throws java.io.IOException
NfsFileInputStream by opening a connection to an
actual NFS file, starting to read at offset 0 and using the preferred
buffer size as the maximums. This constructor will generally give you the
best performance.
If the named file does not exist, is a directory rather than a regular
file, or for some other reason cannot be opened for reading then a
FileNotFoundException is thrown.
nfsFile - The NFS file instance to be read.java.io.IOException - If the file does not exist, is a directory rather than a
regular file, or for some other reason cannot be opened for
reading.public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStreampublic boolean markSupported()
markSupported in class java.io.InputStreampublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long bytesToSkip)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException