|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FileInputStream
com.ccg.io.FileSectionInputStream
public final class FileSectionInputStream
A InputStream which only reads from a certain
section of a file.
| Constructor Summary | |
|---|---|
FileSectionInputStream(File f,
long sofs,
long eofs)
Fully construct the object. |
|
| Method Summary | |
|---|---|
int |
available()
Determine how many bytes can be read without blocking - see InputStream.available() for details. |
int |
read()
Reads next byte from file (returned as integer). |
int |
read(byte[] ba)
Read collection of bytes into array. |
int |
read(byte[] ba,
int ofs,
int len)
Read collection of bytes into array. |
long |
skip(long n)
Skip over n bytes - see InputStream.skip(long) for details. |
| Methods inherited from class java.io.FileInputStream |
|---|
close, finalize, getChannel, getFD |
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileSectionInputStream(File f,
long sofs,
long eofs)
throws IOException
f - File to read from - must not be null.sofs - Start position in file (where read starts from). Must be in
the range of 0 to the size of the file.eofs - End position in file (where read stops). Must be in the range
of 'sofs' to the size of the file.
IOException| Method Detail |
|---|
public int read()
throws IOException
read in class FileInputStreamIOException
public int read(byte[] ba)
throws IOException
read in class FileInputStreamIOException
public int read(byte[] ba,
int ofs,
int len)
throws IOException
read in class FileInputStreamIOException
public long skip(long n)
throws IOException
InputStream.skip(long) for details.
skip in class FileInputStreamIOException
public int available()
throws IOException
InputStream.available() for details.
available in class FileInputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||