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
FieldsModifier and TypeFieldDescriptionstatic final shortThe resources is not fixed.static final shortThe resource is preloaded.static final shortThe resource can be shared. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Returns the actual bytes for this resource.shortReturns the file length of this resource.intReturns the shifted file length of this resource.shortReturns the file offset of this resource.intReturns the shifted file offset of this resource.shortReturns the flag word of this resource.shortReturns the handle of this resource.shortReturns the resource ID of this resource.shortgetUsage()Returns the usage of this resource.booleanReturns true if this resource is moveable.booleanReturns true if this resource is preloaded.booleanisPure()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
-