java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.memory.VMReader.Buf
Enclosing class:
VMReader

public static class VMReader.Buf extends Object
Reader object provided by the reader's read() method.
  • Constructor Details

    • Buf

      public Buf(byte[] bytes, int baseoff, INativeType t, IVirtualMemory vm)
      Create a buffer reader.
      Parameters:
      bytes - backing bytes
      baseoff - base offset in the backing bytes
      t - native type
      vm - virtual memory object
  • Method Details

    • getByte

      public int getByte(String fieldName)
      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

      public int getShort(String fieldName)
      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

      public int getInt(String fieldName)
      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

      public long getLong(String fieldName)
      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

      public long getPtr(String fieldName)
      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

      public String readPointedAsciiString(String fieldName)
      Read a pointed zero-terminated ASCII string.
      Parameters:
      fieldName - pointer field name
      Returns:
      string, or null