public interface RandomAccessBuffer
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
free()
Free the underlying resources.
|
void |
pread(long fileOffset,
byte[] buf,
int bufOffset,
int length)
Read a block of data from a specific location in the file.
|
void |
pwrite(long fileOffset,
byte[] buf,
int bufOffset,
int length) |
long |
size() |
long size()
void pread(long fileOffset,
byte[] buf,
int bufOffset,
int length)
throws java.io.IOException
fileOffset - The offset within the file to read from.buf - The buffer to write to.bufOffset - The offset within the buffer to the first read byte.length - The length of data to read.java.io.IOException - If we were unable to read the required number of bytes etc.java.lang.IllegalArgumentException - If fileOffset is negative.void pwrite(long fileOffset,
byte[] buf,
int bufOffset,
int length)
throws java.io.IOException
java.io.IOExceptionvoid close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablevoid free()