Question

2
Replies
667
Views
SammyWaris Member since 2010 3 posts
Wanki & ARIS Ltd
Posted: July 28, 2017
Last activity: August 2, 2017
Closed

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

Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn