class BufferedRandomAccessFile
extends RandomAccessFileOrArray
Modifier and Type | Field and Description |
---|---|
(package private) RandomAccessFile |
baseFile |
(package private) byte[] |
buffer |
(package private) int |
BUFFER_SIZE |
(package private) int |
bufferFilePointer |
(package private) int |
bufferLength |
(package private) int |
bufferPos |
(package private) String |
filename |
(package private) boolean |
havePrevByte |
(package private) byte |
prevByte |
(package private) int |
startOffset |
Constructor and Description |
---|
BufferedRandomAccessFile(String filename) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private void |
fillBuffer()
Fill our buffer with data at the current file pointer.
|
int |
getFilePointer() |
ByteBuffer |
getNioByteBuffer() |
int |
getStartOffset() |
protected void |
insureOpen() |
boolean |
isOpen() |
int |
length() |
void |
pushBack(byte b) |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reOpen() |
void |
seek(int pos) |
void |
seek(long pos) |
void |
setStartOffset(int off) |
int |
skipBytes(int n) |
InputStreamToArray, read, readBoolean, readByte, readChar, readCharLE, readDouble, readDoubleLE, readFloat, readFloatLE, readFully, readFully, readInt, readIntLE, readLine, readLong, readLongLE, readShort, readShortLE, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedShort, readUnsignedShortLE, readUTF, skip
RandomAccessFile baseFile
byte prevByte
boolean havePrevByte
final int BUFFER_SIZE
byte[] buffer
int startOffset
int bufferLength
int bufferPos
int bufferFilePointer
String filename
public BufferedRandomAccessFile(String filename) throws IOException
IOException
public void pushBack(byte b)
pushBack
in class RandomAccessFileOrArray
private void fillBuffer() throws IOException
IOException
public int read() throws IOException
read
in class RandomAccessFileOrArray
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class RandomAccessFileOrArray
IOException
public int skipBytes(int n) throws IOException
skipBytes
in interface DataInput
skipBytes
in class RandomAccessFileOrArray
IOException
public void reOpen() throws IOException
reOpen
in class RandomAccessFileOrArray
IOException
protected void insureOpen() throws IOException
insureOpen
in class RandomAccessFileOrArray
IOException
public boolean isOpen()
isOpen
in class RandomAccessFileOrArray
public void close() throws IOException
close
in class RandomAccessFileOrArray
IOException
public void setStartOffset(int off)
setStartOffset
in class RandomAccessFileOrArray
public int getStartOffset()
getStartOffset
in class RandomAccessFileOrArray
public int length() throws IOException
length
in class RandomAccessFileOrArray
IOException
public void seek(int pos) throws IOException
seek
in class RandomAccessFileOrArray
IOException
public void seek(long pos) throws IOException
seek
in class RandomAccessFileOrArray
IOException
public int getFilePointer() throws IOException
getFilePointer
in class RandomAccessFileOrArray
IOException
public ByteBuffer getNioByteBuffer() throws IOException
getNioByteBuffer
in class RandomAccessFileOrArray
IOException