Class CoffArchiveHeader

  • All Implemented Interfaces:

    public final class CoffArchiveHeader
    extends java.lang.Object
    implements StructConverter
    A class that represents a COFF archive file (ie. MS .lib files, Unix .ar files)

    COFF archives are very primitive compared to containers like ZIP or even TAR.

    The name of entries (ie. files) inside the archive is limited to 16 bytes, and to support longer names a couple of different schemes have been invented. See the comments in, LongNamesMember) for decoding the name.

    • Constructor Detail

      • CoffArchiveHeader

        protected CoffArchiveHeader()
    • Method Detail

      • isMatch

        public static boolean isMatch​(ByteProvider provider)
        Returns true if the data contained in the provider contains a COFF Archive file.

        provider -
      • toDataType

        public DataType toDataType()
                            throws DuplicateNameException,
        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 a structure datatype representing the implementor of this interface
        DuplicateNameException - when a datatype of the same name already exists
        See Also:
      • isMSFormat

        public boolean isMSFormat()
        Returns true if this COFF archive seems to be a Microsoft lib file (ie. has linker members and other features specific to MS)