Package ghidra.app.util.bin.format.ne
Class Resource
- java.lang.Object
-
- ghidra.app.util.bin.format.ne.Resource
-
- Direct Known Subclasses:
ResourceStringTable
public class Resource extends java.lang.ObjectAn implementation of the new-executable TNAMEINFO structure.
-
-
Field Summary
Fields Modifier and Type Field Description static shortFLAG_MOVEABLEThe resources is not fixed.static shortFLAG_PRELOADThe resource is preloaded.static shortFLAG_PUREThe resource can be shared.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()Returns the actual bytes for this resource.shortgetFileLength()Returns the file length of this resource.intgetFileLengthShifted()Returns the shifted file length of this resource.shortgetFileOffset()Returns the file offset of this resource.intgetFileOffsetShifted()Returns the shifted file offset of this resource.shortgetFlagword()Returns the flag word of this resource.shortgetHandle()Returns the handle of this resource.shortgetResourceID()Returns the resource ID of this resource.shortgetUsage()Returns the usage of this resource.booleanisMoveable()Returns true if this resource is moveable.booleanisPreload()Returns true if this resource is preloaded.booleanisPure()Returns true if this resource is pure.java.lang.StringtoString()
-
-
-
Field Detail
-
FLAG_MOVEABLE
public static final short FLAG_MOVEABLE
The resources is not fixed.- See Also:
- Constant Field Values
-
FLAG_PURE
public static final short FLAG_PURE
The resource can be shared.- See Also:
- Constant Field Values
-
FLAG_PRELOAD
public static final short FLAG_PRELOAD
The resource is preloaded.- See Also:
- Constant Field Values
-
-
Method Detail
-
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 java.io.IOExceptionReturns the actual bytes for this resource.- Returns:
- the actual bytes for this resource
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-