Class CliAbstractStream

    • Constructor Detail

      • CliAbstractStream

        public CliAbstractStream​(CliStreamHeader header,
                                 long offset,
                                 int rva,
                                 BinaryReader reader)
        Creates a new generic CLI stream type. This is intended to be called by a subclass stream during its creation.
        header - The stream header associated with this stream.
        offset - The reader offset where this stream starts.
        rva - The relative virtual address where this stream starts.
        reader - A reader that is used to read the stream.
        Throws: - if there is a problem reading the stream.
    • Method Detail

      • parse

        public abstract boolean parse()
        Parses this stream.
        True if parsing completed successfully; otherwise, false.
        Throws: - If there was an IO problem while parsing.
      • markup

        public void markup​(Program program,
                           boolean isBinary,
                           TaskMonitor monitor,
                           MessageLog log,
                           NTHeader ntHeader)
                    throws DuplicateNameException,
        Does basic markup that all streams will want:
        • Set monitor message
        • Validate addresses
        • Add bookmark
        • Add symbol
        • Create data type
        Subclass should first call this and then provide any custom markup they need.
        Specified by:
        markup in interface PeMarkupable
        program - The program to markup.
        isBinary - True if the program is binary; otherwise, false.
        monitor - The monitor.
        log - The log.
        ntHeader - The PE's NT Header structure.
      • getStreamHeader

        public CliStreamHeader getStreamHeader()
        Gets this stream's header.
        This stream's header.
      • getStreamMarkupAddress

        public static Address getStreamMarkupAddress​(Program program,
                                                     boolean isBinary,
                                                     TaskMonitor monitor,
                                                     MessageLog log,
                                                     NTHeader ntHeader,
                                                     CliAbstractStream stream,
                                                     int streamIndex)
        Gets the markup address of an offset in a given stream.
        program -
        isBinary -
        monitor -
        log -
        ntHeader -
        stream - The stream to offset into.
        streamIndex - The index into the stream.
        The markup address of the given offset in the provided stream.