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.IOException
public BufferedRandomAccessInputStream(java.lang.String name, java.lang.String mode, int bufferSize) throws java.io.IOException
java.io.IOException
public BufferedRandomAccessInputStream(java.lang.String name, java.lang.String mode, int stackDepth, int bufferSize) throws java.io.IOException
java.io.IOException
public BufferedRandomAccessInputStream(java.io.File f, java.lang.String mode, int stackDepth, int bufferSize) throws java.io.IOException
java.io.IOException
protected void flush(int bufferNumber) throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
protected void activate(int bufferNumber, int off)
protected void load(long pos) throws java.io.IOException
java.io.IOException
protected final void advance() throws java.io.IOException
java.io.IOException
protected void acquire(long pos) throws java.io.IOException
java.io.IOException
protected final void advancePointer(int n) throws java.io.IOException
java.io.IOException
protected final void advancePointerWrite(int n) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int skipBytes(int n) throws java.io.IOException
java.io.IOException
public void write(int b) throws java.io.IOException
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public void write(byte[] b) throws java.io.IOException
java.io.IOException
public long getFilePointer() throws java.io.IOException
java.io.IOException
public void seek(long pos) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException