public class BufferedRandomInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
BufferedRandomInputStream(java.io.File file) |
BufferedRandomInputStream(java.io.File file,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
length()
Supplies functionality of the
RandomAccessFile.length(). |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
seek(long pos)
Supplies functionality of the
RandomAccessFile.seek(long) in
a buffer-friendly manner. |
long |
skip(long n) |
java.lang.String |
toString() |
public BufferedRandomInputStream(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomInputStream(java.io.File file,
int bufferSize)
throws java.io.IOException
java.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int available()
available in class java.io.InputStreampublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void seek(long pos)
throws java.io.IOException
RandomAccessFile.seek(long) in
a buffer-friendly manner.pos - offsetjava.io.IOExceptionpublic long length()
throws java.io.IOException
RandomAccessFile.length().java.io.IOException