Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Blob b1 = Blob.valueOf('s1');
  2. Blob b2 = Blob.valueOf('s2');
  3. Blob b3 = Blob.valueOf('s3');
  4. Blob combined = b1 + b2 + b3; //Error: expression must use numeric arguments.
  5.  
  6. Blob b1 = Blob.valueOf('s1');
  7. Blob b2 = Blob.valueOf('s2');
  8. Blob b3 = Blob.valueOf('s3');
  9.  
  10. String combinedDataAsHex = EncodingUtil.convertToHex(b1) + EncodingUtil.convertToHex(b2) + EncodingUtil.convertToHex(b3);
  11. Blob combinedDataAsBlob = EncodingUtil.convertFromHex(combinedDataAsHex);
  12.  
  13. Blob b1 = Blob.valueOf('s1');
  14. Blob b2 = Blob.valueOf('s2');
  15. Blob b3 = Blob.valueOf('s3');
  16.  
  17. String combinedDataAsBase64 = EncodingUtil.base64Encode(b1) + EncodingUtil.base64Encode(b2) + EncodingUtil.base64Encode(b3);
  18. Blob combinedDataAsBlob = EncodingUtil.base64Decode(combinedDataAsBase64);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement