Package ghidra.program.model.pcode

# Class StringIngest

java.lang.Object
ghidra.program.model.pcode.StringIngest

All Implemented Interfaces:
  `ByteIngest`

public class StringIngest extends Object implements ByteIngest

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringIngest()`
  `StringIngest(int max, String src)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Clear any previous cached bytes.
  `void`
  `endIngest()`
  Formal indicator that ingesting of bytes is complete and processing can begin
  `void`
  `ingestStream(InputStream inStream)`
  Ingest bytes from the stream up to (and including) the first 0 byte.
  `boolean`
  `isEmpty()`
  `void`
  `open(int max, String src)`
  Open the ingester for receiving bytes.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### StringIngest

    public StringIngest()

  - ### StringIngest

    public StringIngest(int max, String src)

- ## Method Details

  - ### open

    public void open(int max, String src)
    Description copied from interface: `ByteIngest`
    Open the ingester for receiving bytes. This establishes the description of the source of the bytes and maximum number of bytes that can be read
    Specified by:
      `open` in interface `ByteIngest`
    Parameters:
      `max` - is the maximum number of bytes that can be read
      `src` - is the description of the byte source

  - ### ingestStream

    public void ingestStream(InputStream inStream) throws IOException
    Description copied from interface: `ByteIngest`
    Ingest bytes from the stream up to (and including) the first 0 byte. This can be called multiple times to read in bytes in different chunks. An absolute limit is set on the number of bytes that can be ingested via the max parameter to a previous call to open(), otherwise an exception is thrown.
    Specified by:
      `ingestStream` in interface `ByteIngest`
    Parameters:
      `inStream` - is the input stream to read from
    Throws:
      `IOException` - for errors reading from the stream

  - ### endIngest

    public void endIngest()
    Description copied from interface: `ByteIngest`
    Formal indicator that ingesting of bytes is complete and processing can begin
    Specified by:
      `endIngest` in interface `ByteIngest`

  - ### clear

    public void clear()
    Description copied from interface: `ByteIngest`
    Clear any previous cached bytes.
    Specified by:
      `clear` in interface `ByteIngest`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### isEmpty

    public boolean isEmpty()
    Specified by:
      `isEmpty` in interface `ByteIngest`
    Returns:
      true if no bytes have yet been ingested via ingestStream()