|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.tukaani.xz.SeekableInputStream
org.tukaani.xz.SeekableFileInputStream
public class SeekableFileInputStream
Wraps a RandomAccessFile
in a SeekableInputStream.
Field Summary | |
---|---|
protected RandomAccessFile |
randomAccessFile
The RandomAccessFile that has been wrapped into a SeekableFileInputStream. |
Constructor Summary | |
---|---|
SeekableFileInputStream(File file)
Creates a new seekable input stream that reads from the specified file. |
|
SeekableFileInputStream(RandomAccessFile randomAccessFile)
Creates a new seekable input stream from an existing RandomAccessFile object. |
|
SeekableFileInputStream(String name)
Creates a new seekable input stream that reads from a file with the specified name. |
Method Summary | |
---|---|
void |
close()
Calls randomAccessFile.close() . |
long |
length()
Calls randomAccessFile.length() . |
long |
position()
Calls randomAccessFile.getFilePointer() . |
int |
read()
Calls randomAccessFile.read() . |
int |
read(byte[] buf)
Calls randomAccessFile.read(buf) . |
int |
read(byte[] buf,
int off,
int len)
Calls randomAccessFile.read(buf, off, len) . |
void |
seek(long pos)
Calls randomAccessFile.seek(long) . |
Methods inherited from class org.tukaani.xz.SeekableInputStream |
---|
skip |
Methods inherited from class java.io.InputStream |
---|
available, mark, markSupported, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RandomAccessFile randomAccessFile
Constructor Detail |
---|
public SeekableFileInputStream(File file) throws FileNotFoundException
FileNotFoundException
public SeekableFileInputStream(String name) throws FileNotFoundException
FileNotFoundException
public SeekableFileInputStream(RandomAccessFile randomAccessFile)
RandomAccessFile
object.
Method Detail |
---|
public int read() throws IOException
randomAccessFile.read()
.
read
in class InputStream
IOException
public int read(byte[] buf) throws IOException
randomAccessFile.read(buf)
.
read
in class InputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
randomAccessFile.read(buf, off, len)
.
read
in class InputStream
IOException
public void close() throws IOException
randomAccessFile.close()
.
close
in interface Closeable
close
in class InputStream
IOException
public long length() throws IOException
randomAccessFile.length()
.
length
in class SeekableInputStream
IOException
public long position() throws IOException
randomAccessFile.getFilePointer()
.
position
in class SeekableInputStream
IOException
public void seek(long pos) throws IOException
randomAccessFile.seek(long)
.
seek
in class SeekableInputStream
pos
- new read position in the stream
IOException
- if pos
is negative or if
a stream-specific I/O error occurs
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |