org.apache.lucene.util
Class RandomAccessInputStream
Object
InputStream
RandomAccessInputStream
- All Implemented Interfaces:
- Closeable
public class RandomAccessInputStream
- extends InputStream
Provides a handy InputStream wrapper around a RandomAccessFile.
- Author:
- Martin Haye
Field Summary |
private RandomAccessFile |
in
The file that will be read from |
Methods inherited from class InputStream |
available, mark, markSupported, reset |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
private RandomAccessFile in
- The file that will be read from
RandomAccessInputStream
public RandomAccessInputStream(RandomAccessFile in)
- Wrap a RandomAccessFile
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
seek
public void seek(long n)
throws IOException
- Throws:
IOException
getFilePointer
public long getFilePointer()
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException