Package ghidra.app.util.bin.format.ne
Class Resource
java.lang.Object
ghidra.app.util.bin.format.ne.Resource
- Direct Known Subclasses:
ResourceStringTable
An implementation of the new-executable TNAMEINFO structure.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
The resources is not fixed.static final short
The resource is preloaded.static final short
The resource can be shared. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes()
Returns the actual bytes for this resource.short
Returns the file length of this resource.int
Returns the shifted file length of this resource.short
Returns the file offset of this resource.int
Returns the shifted file offset of this resource.short
Returns the flag word of this resource.short
Returns the handle of this resource.short
Returns the resource ID of this resource.short
getUsage()
Returns the usage of this resource.boolean
Returns true if this resource is moveable.boolean
Returns true if this resource is preloaded.boolean
isPure()
Returns true if this resource is pure.toString()
-
Field Details
-
FLAG_MOVEABLE
public static final short FLAG_MOVEABLEThe resources is not fixed.- See Also:
-
FLAG_PURE
public static final short FLAG_PUREThe resource can be shared.- See Also:
-
FLAG_PRELOAD
public static final short FLAG_PRELOADThe 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
Returns the actual bytes for this resource.- Returns:
- the actual bytes for this resource
- Throws:
IOException
-
toString
-