public class RAFInputStream extends InputStream
| Constructor and Description |
|---|
RAFInputStream(RandomAccessFile raf)
Constructor with default buffer size.
|
RAFInputStream(RandomAccessFile raf,
int bufferSize)
Constructor with buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getFilePos()
Returns the current position in the file.
|
RandomAccessFile |
getRAF()
Returns the RandomAccessFile object.
|
int |
read()
Reads a single byte from the file.
|
int |
read(byte[] b)
Reads some number of bytes from the input stream and
stores them into the buffer array b.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream
into an array of bytes.
|
void |
seek(long offset)
Positions the stream to a different point in the file.
|
long |
skip(long n)
Skips some number of bytes.
|
available, close, mark, markSupported, resetpublic RAFInputStream(RandomAccessFile raf)
raf - The file on which the
stream is to be based.public RAFInputStream(RandomAccessFile raf, int bufferSize)
raf - The file on which the
stream is to be based.bufferSize - The buffer size to be used.
If less than or equal to 0, the
default buffer size is used.public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic RandomAccessFile getRAF()
public void seek(long offset)
throws IOException
IOExceptionpublic long getFilePos()
throws IOException
IOExceptionCopyright © 2008–2017 The Open Preservation Foundation. All rights reserved.