|
||||||||
| 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 java.io.RandomAccessFile |
randomAccessFile
The RandomAccessFile that has been wrapped into a SeekableFileInputStream. |
| Constructor Summary | |
|---|---|
SeekableFileInputStream(java.io.File file)
Creates a new seekable input stream that reads from the specified file. |
|
SeekableFileInputStream(java.io.RandomAccessFile randomAccessFile)
Creates a new seekable input stream from an existing RandomAccessFile object. |
|
SeekableFileInputStream(java.lang.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 java.io.RandomAccessFile randomAccessFile
| Constructor Detail |
|---|
public SeekableFileInputStream(java.io.File file)
throws java.io.FileNotFoundException
java.io.FileNotFoundException
public SeekableFileInputStream(java.lang.String name)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic SeekableFileInputStream(java.io.RandomAccessFile randomAccessFile)
RandomAccessFile object.
| Method Detail |
|---|
public int read()
throws java.io.IOException
randomAccessFile.read().
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] buf)
throws java.io.IOException
randomAccessFile.read(buf).
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] buf,
int off,
int len)
throws java.io.IOException
randomAccessFile.read(buf, off, len).
read in class java.io.InputStreamjava.io.IOException
public void close()
throws java.io.IOException
randomAccessFile.close().
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOException
public long length()
throws java.io.IOException
randomAccessFile.length().
length in class SeekableInputStreamjava.io.IOException
public long position()
throws java.io.IOException
randomAccessFile.getFilePointer().
position in class SeekableInputStreamjava.io.IOException
public void seek(long pos)
throws java.io.IOException
randomAccessFile.seek(long).
seek in class SeekableInputStreampos - new read position in the stream
java.io.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 | |||||||