Package ghidra.program.model.pcode
Interface CachedEncoder
- All Superinterfaces:
Encoder
- All Known Subinterfaces:
PatchEncoder
- All Known Implementing Classes:
PackedEncodeOverlay
,PatchPackedEncode
,XmlEncode
An Encoder that holds its bytes in memory (where they can possibly be edited) and
can then finally write them all to an OutputStream via a call to writeTo()
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear any state associated with the encoder The encoder should be ready to write a new document after this call.boolean
isEmpty()
The encoder is considered empty if the writeTo() method would output zero bytesvoid
writeTo
(OutputStream stream) Dump all the accumulated bytes in this encoder to the stream.Methods inherited from interface ghidra.program.model.pcode.Encoder
closeElement, openElement, writeBool, writeOpcode, writeSignedInteger, writeSpace, writeSpace, writeString, writeStringIndexed, writeUnsignedInteger
-
Method Details
-
clear
void clear()Clear any state associated with the encoder The encoder should be ready to write a new document after this call. -
isEmpty
boolean isEmpty()The encoder is considered empty if the writeTo() method would output zero bytes- Returns:
- true if there are no bytes in the encoder
-
writeTo
Dump all the accumulated bytes in this encoder to the stream.- Parameters:
stream
- is the output stream- Throws:
IOException
- for errors during the write operation
-