Class CoffArchiveMemberHeader
java.lang.Object
ghidra.app.util.bin.format.coff.archive.CoffArchiveMemberHeader
- All Implemented Interfaces:
StructConverter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCoffArchiveMemberHeader
(String name, long date, String userId, String groupId, String mode, long size, long payloadOffset, long memberOffset) -
Method Summary
Modifier and TypeMethodDescriptionlong
getDate()
Milliseconds since java Date epochlong
int
getMode()
getName()
long
long
getSize()
int
boolean
isCOFF()
Returns true if this header contains a COFF file.static CoffArchiveMemberHeader
read
(BinaryReader reader, LongNamesMember longNames) Reads a COFF archive member header from the specifiedreader
, leaving the file position at the start of the this member's payload.Returns a structure datatype representing the contents of the implementor of this interface.
-
Field Details
-
SLASH
- See Also:
-
SLASH_SLASH
- See Also:
-
CAMH_MIN_SIZE
public static final int CAMH_MIN_SIZE- See Also:
-
-
Constructor Details
-
CoffArchiveMemberHeader
-
-
Method Details
-
read
public static CoffArchiveMemberHeader read(BinaryReader reader, LongNamesMember longNames) throws IOException Reads a COFF archive member header from the specifiedreader
, leaving the file position at the start of the this member's payload.The archive member's name is fixed up using the specified
longNames
object.- Parameters:
reader
- stream from which to read the COFF archive member header fromlongNames
- optional, string table with long file names (only present in some COFF ar formats)- Returns:
- a new
CoffArchiveMemberHeader
- Throws:
IOException
-
getName
-
getDate
public long getDate()Milliseconds since java Date epoch- Returns:
-
getUserId
-
getGroupId
-
getUserIdInt
public int getUserIdInt() -
getGroupIdInt
public int getGroupIdInt() -
getMode
-
getSize
public long getSize() -
getPayloadOffset
public long getPayloadOffset() -
getFileOffset
public long getFileOffset() -
isCOFF
public boolean isCOFF()Returns true if this header contains a COFF file.- Returns:
- true if this header contains a COFF file
-
toDataType
Description copied from interface:StructConverter
Returns a structure datatype representing the contents of the implementor of this interface.For example, given:
class A { int foo; double bar; }
The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.
- Specified by:
toDataType
in interfaceStructConverter
- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException
- when a datatype of the same name already existsIOException
- if an IO-related error occurs- See Also:
-