Question
Ministerie Van Economische Zaken
NL
Last activity: 2 Aug 2017 5:04 EDT
How do I create a java.io.ByteArrayInputStream from an instance of Data-WorkAttach-File
Dear PSC,
I am trying to save an instance of a Data-WorkAttach-File into a CMIS repository.
The requirement obliges me to use a CMIS session object so I can manipulate the authorization class.
To use the CMIS session, I have a java activity that gets the attachment from the Pega database and should use the attachment.pyAttachStream as input to generate a java.io.ByteArrayInputStream and then use the ByteArrayInputStream in generating the org.apache.chemistry.opencmis.commons.data.ContentStream.
Can you please indicate how to cast the encode string (Data-WorkAttach-File.pyAttachStream into and java byte[] array? Or how to generate a CMIS content stream from the clipboard property pyAttachStream?
My environment is Pega 7.2.2 interfacing with an Alfresco CMIS installation.
Kind regards,
Samuel