Replacing bytes in bizdoc

I have a situation where I need replace bizdoc content on the fly.
Lets say my bizdoc contain content xyz then i want to replace it with xaz.
I can extract bytes and convert it string then replace the content then convert back from string to bytes and map to bizdoc bytes.
Can I work with just bytes ? instead of doing all these conversions.

IIRC, bizdoc content cannot be changed. You may be able to do so in the pipeline object, but the TN persisted content will not change.

If you don’t need to do any manipulation of the original content string, then I don’t see any reason why you couldn’t just work with byte arrays.

you cannot edit/change the bizdoc/content(bytes) as it was already persisted in TN and can’t assign back the updated one.

You can play anything with the output of bytesToString and stringTobytes conversion etc…