public class BufferedRandomAccessInputStream extends SeekableInputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[][] |
buffer |
protected int |
bufferPtr |
protected int |
bufferSize |
protected int[][] |
dirtyRange |
protected int[] |
eofAt |
protected long[] |
offset |
protected java.io.RandomAccessFile |
raf |
protected int |
stackDepth |
| Constructor and Description |
|---|
BufferedRandomAccessInputStream(java.io.File f,
java.lang.String mode,
int stackDepth,
int bufferSize) |
BufferedRandomAccessInputStream(java.lang.String name,
java.lang.String mode) |
BufferedRandomAccessInputStream(java.lang.String name,
java.lang.String mode,
int bufferSize) |
BufferedRandomAccessInputStream(java.lang.String name,
java.lang.String mode,
int stackDepth,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
acquire(long pos) |
protected void |
activate(int bufferNumber,
int off)
Set an existing buffer as the active buffer and set the
buffer pointer
|
protected void |
advance() |
protected void |
advancePointer(int n) |
protected void |
advancePointerWrite(int n) |
void |
close() |
void |
flush() |
protected void |
flush(int bufferNumber) |
long |
getFilePointer() |
protected void |
load(long pos) |
static void |
main(java.lang.String[] args) |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
seek(long pos) |
int |
skipBytes(int n) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected java.io.RandomAccessFile raf
protected int stackDepth
protected int bufferSize
protected byte[][] buffer
protected int[][] dirtyRange
protected int[] eofAt
protected long[] offset
protected int bufferPtr
public BufferedRandomAccessInputStream(java.lang.String name,
java.lang.String mode)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessInputStream(java.lang.String name,
java.lang.String mode,
int bufferSize)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessInputStream(java.lang.String name,
java.lang.String mode,
int stackDepth,
int bufferSize)
throws java.io.IOException
java.io.IOExceptionpublic BufferedRandomAccessInputStream(java.io.File f,
java.lang.String mode,
int stackDepth,
int bufferSize)
throws java.io.IOException
java.io.IOExceptionprotected void flush(int bufferNumber)
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
java.io.IOExceptionprotected void activate(int bufferNumber,
int off)
protected void load(long pos)
throws java.io.IOException
java.io.IOExceptionprotected final void advance()
throws java.io.IOException
java.io.IOExceptionprotected void acquire(long pos)
throws java.io.IOException
java.io.IOExceptionprotected final void advancePointer(int n)
throws java.io.IOException
java.io.IOExceptionprotected final void advancePointerWrite(int n)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.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 int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int skipBytes(int n)
throws java.io.IOException
java.io.IOExceptionpublic void write(int b)
throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic long getFilePointer()
throws java.io.IOException
java.io.IOExceptionpublic void seek(long pos)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException