Class VMReader.Buf
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.memory.VMReader.Buf
- Enclosing class:
VMReader
Reader object provided by the reader's
read() method.-
Constructor Summary
ConstructorsConstructorDescriptionBuf(byte[] bytes, int baseoff, INativeType t, IVirtualMemory vm) Create a buffer reader. -
Method Summary
Modifier and TypeMethodDescriptionintRead a byte-sized field.intgetByteAt(int off) Read a byte at an offset.intRead an int-sized field.intgetIntAt(int off) Read an int at an offset.longRead a long-sized field.longgetLongAt(int off) Read a long at an offset.longRead a pointer-sized field.longgetPtrAt(int off) Read a pointer at an offset.intRead a short-sized field.intgetShortAt(int off) Read a short at an offset.readPointedAsciiString(String fieldName) Read a pointed zero-terminated ASCII string.
-
Constructor Details
-
Buf
Create a buffer reader.- Parameters:
bytes- backing bytesbaseoff- base offset in the backing bytest- native typevm- virtual memory object
-
-
Method Details
-
getByte
Read a byte-sized field.- Parameters:
fieldName- field name- Returns:
- field value
-
getByteAt
public int getByteAt(int off) Read a byte at an offset.- Parameters:
off- offset- Returns:
- byte value
-
getShort
Read a short-sized field.- Parameters:
fieldName- field name- Returns:
- field value
-
getShortAt
public int getShortAt(int off) Read a short at an offset.- Parameters:
off- offset- Returns:
- short value
-
getInt
Read an int-sized field.- Parameters:
fieldName- field name- Returns:
- field value
-
getIntAt
public int getIntAt(int off) Read an int at an offset.- Parameters:
off- offset- Returns:
- int value
-
getLong
Read a long-sized field.- Parameters:
fieldName- field name- Returns:
- field value
-
getLongAt
public long getLongAt(int off) Read a long at an offset.- Parameters:
off- offset- Returns:
- long value
-
getPtr
Read a pointer-sized field.- Parameters:
fieldName- field name- Returns:
- pointer value
-
getPtrAt
public long getPtrAt(int off) Read a pointer at an offset.- Parameters:
off- offset- Returns:
- pointer value
-
readPointedAsciiString
Read a pointed zero-terminated ASCII string.- Parameters:
fieldName- pointer field name- Returns:
- string, or null
-