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.IOException
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
void free()