public interface RandomAccessReader
| Modifier and Type | Method and Description |
|---|---|
int |
read(long srcOffset,
byte[] dstArr,
int dstArrStart,
int numBytes)
Read bytes into a byte array.
|
int |
read(long srcOffset,
java.nio.ByteBuffer dstBuf,
int dstBufStart,
int numBytes)
Read bytes into a
ByteBuffer. |
byte |
readByte(long offset)
Read a byte at a specific offset (without changing the current cursor offset).
|
int |
readInt(long offset)
Read a int at a specific offset (without changing the current cursor offset).
|
long |
readLong(long offset)
Read a long at a specific offset (without changing the current cursor offset).
|
short |
readShort(long offset)
Read a short at a specific offset (without changing the current cursor offset).
|
java.lang.String |
readString(long offset,
int numBytes)
Reads the "modified UTF8" format defined in the Java classfile spec.
|
java.lang.String |
readString(long offset,
int numBytes,
boolean replaceSlashWithDot,
boolean stripLSemicolon)
Reads the "modified UTF8" format defined in the Java classfile spec, optionally replacing '/' with '
|
int |
readUnsignedByte(long offset)
Read an unsigned byte at a specific offset (without changing the current cursor offset).
|
long |
readUnsignedInt(long offset)
Read a unsigned int at a specific offset (without changing the current cursor offset).
|
int |
readUnsignedShort(long offset)
Read a unsigned short at a specific offset (without changing the current cursor offset).
|
int read(long srcOffset,
java.nio.ByteBuffer dstBuf,
int dstBufStart,
int numBytes)
throws java.io.IOException
ByteBuffer.srcOffset - The offset to start reading from.dstBuf - The ByteBuffer to write into.dstBufStart - The offset within the destination buffer to start writing at.numBytes - The number of bytes to read.java.io.IOException - If there was an exception while reading.int read(long srcOffset,
byte[] dstArr,
int dstArrStart,
int numBytes)
throws java.io.IOException
srcOffset - The offset to start reading from.dstArr - The byte array to write into.dstArrStart - The offset within the destination array to start writing at.numBytes - The number of bytes to read.java.io.IOException - If there was an exception while reading.byte readByte(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.int readUnsignedByte(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.short readShort(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.int readUnsignedShort(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.int readInt(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.long readUnsignedInt(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.long readLong(long offset)
throws java.io.IOException
offset - The buffer offset to read from.java.io.IOException - If there was an exception while reading.java.lang.String readString(long offset,
int numBytes,
boolean replaceSlashWithDot,
boolean stripLSemicolon)
throws java.io.IOException
offset - The start offset of the string.numBytes - The number of bytes of the UTF8 encoding of the string.replaceSlashWithDot - If true, replace '/' with '.'.stripLSemicolon - If true, string final ';' character.java.io.IOException - If an I/O exception occurs.java.lang.String readString(long offset,
int numBytes)
throws java.io.IOException
offset - The start offset of the string.numBytes - The number of bytes of the UTF8 encoding of the string.java.io.IOException - If an I/O exception occurs.