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

# Class CliStreamUserStrings

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

All Implemented Interfaces:
  `PeMarkupable`, `StructConverter`

public class CliStreamUserStrings extends CliStreamBlob
The User Strings stream contains blobs of 16-bit Unicode strings. 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 inherited from class ghidra.app.util.bin.format.pe.cli.streams.CliStreamBlob

  `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
  `CliStreamUserStrings(CliStreamHeader header, long fileOffset, int rva, BinaryReader reader)`
  Creates a new `CliStreamUserStrings`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getName()`
  Gets the name of this stream.
  `String`
  `getUserString(int index)`
  Gets the user string at the given index.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.

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

  `getBlob, parse, updateBlob`

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

- ## Constructor Details

  - ### CliStreamUserStrings

    public CliStreamUserStrings(CliStreamHeader header, long fileOffset, int rva, BinaryReader reader) throws IOException
    Creates a new `CliStreamUserStrings`.
    Parameters:
      `header` - The stream header associated with this stream.
      `fileOffset` - The file offset where this stream starts.
      `rva` - The relative virtual address where this stream starts.
      `reader` - A reader that is set to the start of 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.

  - ### getUserString

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

  - ### 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`
    Overrides:
      `toDataType` in class `CliStreamBlob`
    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`