We need more context for the question. Could you tell us -
- What ReST call you are making? (It feels like it is one of the "document" APIs but I'd like to be sure)
- Where are you making the call from? (BPM Service, Browser, Separate Java Application...)
- Where you want to write the file to?
The answer to the question will differ based on the answers to 2 & 3.
TBH, it would be better to give us the entire problem rather than just asking a tactical question. Something like "I'm writing an Agular application that will pull some data from IBM BPM. Part of that data is the documents attached to a given BPD instance. I'd like to provide the user a link in by UI that will open up those items using the browser. I have the Base64 encoded string, and I think if I convert it to a binary I can display it for the user".
This would be important because we'd likely tell you that IBM BPM can provide a link to the document and you don't need to work with the raw data to get the result you want.
------------------------------
Andrew Paier
------------------------------