Package ghidra.app.util.bin.format.coff.archive

# Class CoffArchiveMemberHeader

java.lang.Object
ghidra.app.util.bin.format.coff.archive.CoffArchiveMemberHeader

All Implemented Interfaces:
  `StructConverter`

public class CoffArchiveMemberHeader extends Object implements StructConverter

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CAMH_MIN_SIZE`
  `static final String`
  `SLASH`
  `static final String`
  `SLASH_SLASH`

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CoffArchiveMemberHeader(String name, long date, String userId, String groupId, String mode, long size, long payloadOffset, long memberOffset)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getDate()`
  Milliseconds since java Date epoch
  `long`
  `getFileOffset()`
  `String`
  `getGroupId()`
  `int`
  `getGroupIdInt()`
  `String`
  `getMode()`
  `String`
  `getName()`
  `long`
  `getPayloadOffset()`
  `long`
  `getSize()`
  `String`
  `getUserId()`
  `int`
  `getUserIdInt()`
  `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 specified `reader`, leaving the file position at the start of this member's payload.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SLASH

    public static final String SLASH
    See Also:
      - Constant Field Values

  - ### SLASH_SLASH

    public static final String SLASH_SLASH
    See Also:
      - Constant Field Values

  - ### CAMH_MIN_SIZE

    public static final int CAMH_MIN_SIZE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CoffArchiveMemberHeader

    public CoffArchiveMemberHeader(String name, long date, String userId, String groupId, String mode, long size, long payloadOffset, long memberOffset)

- ## Method Details

  - ### read

    public static CoffArchiveMemberHeader read(BinaryReader reader, LongNamesMember longNames) throws IOException
    Reads a COFF archive member header from the specified `reader`, leaving the file position at the start of 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 from
      `longNames` - optional, string table with long file names (only present in some COFF ar formats)
    Returns:
      a new `CoffArchiveMemberHeader`
    Throws:
      `IOException`

  - ### getName

    public String getName()

  - ### getDate

    public long getDate()
    Milliseconds since java Date epoch
    Returns:

  - ### getUserId

    public String getUserId()

  - ### getGroupId

    public String getGroupId()

  - ### getUserIdInt

    public int getUserIdInt()

  - ### getGroupIdInt

    public int getGroupIdInt()

  - ### getMode

    public String 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

    public DataType toDataType() throws DuplicateNameException, IOException
    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 interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
      `IOException` - if an IO-related error occurs
    See Also:
      - `StructureDataType`