function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KRITHIKA BALASUBRAMANIANKRITHIKA BALASUBRAMANIAN 

How do I decode this string to byte[] code and then back to HTML form.

Making a service call. Service is sending back the encoded code (blob) pulled from oracle database -> converted to byte[] -> and then converted to String form.
How do I decode this string to byte[] code and then back to HTML form.
 
Jerun JoseJerun Jose
I'm not sure of converting String to Byte array, but you could try using the Blob.Valueof(String) method to directly convert your string to a blob variable.
Guiomar Fernández de BobadillaGuiomar Fernández de Bobadilla
Hi,

Maybe this link can help you: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_encodingUtil.htm

I used base64Encode(inputBlob) for send HTML and base64Decode(inputString) for convert from base64 (encode String) to Blob (HTML) and update a Text Area (Rich).

I hope it helps you!

Regards.