Package ghidra.app.util.bin.format.pe.cli.streams

# Class CliStreamBlob

java.lang.Object
ghidra.app.util.bin.format.pe.cli.streams.CliAbstractStream
ghidra.app.util.bin.format.pe.cli.streams.CliStreamBlob

All Implemented Interfaces:
  `PeMarkupable`, `StructConverter`

Direct Known Subclasses:
  `CliStreamUserStrings`

public class CliStreamBlob extends CliAbstractStream
The Blob stream contains ???. When the stream is present, the first entry is always the byte 0x00. This stream may contain garbage in its unreachable parts.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Map<Integer,CliBlob>`
  `blobMap`

  ### Fields inherited from class ghidra.app.util.bin.format.pe.cli.streams.CliAbstractStream

  `header, offset, PATH, reader, rva`

  ### 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
  `CliStreamBlob(CliStreamHeader header, long offset, int rva, BinaryReader reader)`
  Creates a new Blob stream.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CliBlob`
  `getBlob(int index)`
  Gets the blob at the given index.
  `static String`
  `getName()`
  Gets the name of this stream.
  `boolean`
  `parse()`
  Parses this stream.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.
  `boolean`
  `updateBlob(CliBlob updatedBlob, Address addr, Program program)`
  Updates the blob at the given address with the new blob.

  ### Methods inherited from class ghidra.app.util.bin.format.pe.cli.streams.CliAbstractStream

  `getStreamHeader, getStreamMarkupAddress, markup`

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

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

- ## Field Details

  - ### blobMap

    protected Map<Integer,CliBlob> blobMap

- ## Constructor Details

  - ### CliStreamBlob

    public CliStreamBlob(CliStreamHeader header, long offset, int rva, BinaryReader reader) throws IOException
    Creates a new Blob stream.
    Parameters:
      `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:
      `IOException` - if there is a problem reading the stream.

- ## Method Details

  - ### getName

    public static String getName()
    Gets the name of this stream.
    Returns:
      The name of this stream.

  - ### parse

    public boolean parse() throws IOException
    Description copied from class: `CliAbstractStream`
    Parses this stream.
    Specified by:
      `parse` in class `CliAbstractStream`
    Returns:
      True if parsing completed successfully; otherwise, false.
    Throws:
      `IOException` - If there was an IO problem while parsing.

  - ### getBlob

    public CliBlob getBlob(int index)
    Gets the blob at the given index.
    Parameters:
      `index` - The index of the blob to get.
    Returns:
      The blob at the given index. Could be null if the index was invalid or there was a problem reading the blob.

  - ### updateBlob

    public boolean updateBlob(CliBlob updatedBlob, Address addr, Program program)
    Updates the blob at the given address with the new blob.
    Parameters:
      `updatedBlob` - The updated blob.
      `addr` - The address of the blob to update.
      `program` - The program that will get the update.

  - ### 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.

    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
      `IOException`
    See Also:
      - `StructureDataType`