public class RandomAccessInputStream extends SeekInputStream
| Constructor and Description |
|---|
RandomAccessInputStream(File file)
Constructor.
|
RandomAccessInputStream(File file,
long offset)
Constructor.
|
RandomAccessInputStream(RandomAccessFile raf)
Constructor.
|
RandomAccessInputStream(RandomAccessFile raf,
boolean sympathyClose,
long offset) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
mark(int readlimit)
Marks the current position of the stream.
|
boolean |
markSupported()
Returns true, since SeekInputStreams support mark/reset by default.
|
long |
position() |
void |
position(long position) |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset()
Resets this stream to its marked position.
|
long |
skip(long n) |
public RandomAccessInputStream(RandomAccessFile raf) throws IOException
raf - RandomAccessFile to wrap.IOExceptionpublic RandomAccessInputStream(File file) throws IOException
file - File to get RAFIS on. Creates an RAF from passed file.
Closes the created RAF when this stream is closed.IOExceptionpublic RandomAccessInputStream(File file, long offset) throws IOException
file - File to get RAFIS on. Creates an RAF from passed file.
Closes the created RAF when this stream is closed.offset - IOExceptionpublic RandomAccessInputStream(RandomAccessFile raf, boolean sympathyClose, long offset) throws IOException
raf - RandomAccessFile to wrap.sympathyClose - Set to true if we are to close the RAF
file when this stream is closed.offset - IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic long position()
throws IOException
IOExceptionpublic void position(long position)
throws IOException
IOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic boolean markSupported()
SeekInputStreammarkSupported in class SeekInputStreampublic void mark(int readlimit)
SeekInputStreammark in class SeekInputStreamreadlimit - ignoredpublic void reset()
throws IOException
SeekInputStreamreset in class SeekInputStreamIOException - if there is no mark, or if an IO error occurspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.