Class CliStreamHeader

    • Constructor Detail

      • CliStreamHeader

        public CliStreamHeader​(CliMetadataRoot metadataRoot,
                               BinaryReader reader)
                        throws java.io.IOException
        Constructs a new CLI Stream Header datatype.
        Parameters:
        reader - A binary reader set to start reading at the start of this header.
        virtualAddress - The RVA of this header.
        ntHeader - The NT header.
        Throws:
        java.io.IOException
    • Method Detail

      • toDataType

        public DataType toDataType()
                            throws DuplicateNameException,
                                   java.io.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
        java.io.IOException
        See Also:
        StructureDataType
      • getOffset

        public int getOffset()
        Gets the offset. This is not a file offset, but an offset that gets added to the metadata header's offset to obtain a file offset.
        Returns:
        The offset.
      • getSize

        public int getSize()
        Gets the size of this header's stream.
        Returns:
        The size of this header's stream.
      • getName

        public java.lang.String getName()
        Gets the name of this header's stream.
        Returns:
        The name of this header's stream.
      • getNameLength

        public int getNameLength()
        Gets the name length.

        The name length may be larger than necessary because the name string is must be aligned to the next 4-byte boundary.

        Returns:
        The name length.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setStream

        protected void setStream​(CliAbstractStream stream)
        Sets this header's stream.
        Parameters:
        stream - The stream associated with this header.