Class Resource

java.lang.Object
ghidra.app.util.bin.format.ne.Resource
Direct Known Subclasses:
ResourceStringTable

public class Resource extends Object
An implementation of the new-executable TNAMEINFO structure.
  • Field Details

    • FLAG_MOVEABLE

      public static final short FLAG_MOVEABLE
      The resources is not fixed.
      See Also:
    • FLAG_PURE

      public static final short FLAG_PURE
      The resource can be shared.
      See Also:
    • FLAG_PRELOAD

      public static final short FLAG_PRELOAD
      The resource is preloaded.
      See Also:
  • Method Details

    • getFileOffset

      public short getFileOffset()
      Returns the file offset of this resource.
      Returns:
      the file offset of this resource
    • getFileLength

      public short getFileLength()
      Returns the file length of this resource.
      Returns:
      the file length of this resource
    • getFlagword

      public short getFlagword()
      Returns the flag word of this resource.
      Returns:
      the flag word of this resource
    • getResourceID

      public short getResourceID()
      Returns the resource ID of this resource.
      Returns:
      the resource ID of this resource
    • getHandle

      public short getHandle()
      Returns the handle of this resource.
      Returns:
      the handle of this resource
    • getUsage

      public short getUsage()
      Returns the usage of this resource.
      Returns:
      the usage of this resource
    • isMoveable

      public boolean isMoveable()
      Returns true if this resource is moveable.
      Returns:
      true if this resource is moveable
    • isPure

      public boolean isPure()
      Returns true if this resource is pure.
      Returns:
      true if this resource is pure
    • isPreload

      public boolean isPreload()
      Returns true if this resource is preloaded.
      Returns:
      true if this resource is preloaded
    • getFileOffsetShifted

      public int getFileOffsetShifted()
      Returns the shifted file offset of this resource. this.getFileOffset() << ResourceTable.getAlignmentShiftCount()
      Returns:
      the shifted file offset of this resource
    • getFileLengthShifted

      public int getFileLengthShifted()
      Returns the shifted file length of this resource. this.getFileLength() << ResourceTable.getAlignmentShiftCount()
      Returns:
      the shifted file length of this resource
    • getBytes

      public byte[] getBytes() throws IOException
      Returns the actual bytes for this resource.
      Returns:
      the actual bytes for this resource
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: