AnsweredAssumed Answered

Alfresco and CMIS

Question asked by rahmanibilel on May 27, 2014
Latest reply on May 28, 2014 by rahmanibilel
Hello, i want to read my documents from alfresco using open cmis, but i can not read from my hard disc after saving in it

my code :

Document document = documentServiceImpl.getDocumetByPath(session, "/alfresco-bpm-20090503.pdf", CMISHelper.BROWSE_OPERATION_CONTEXT) ;
InputStream stream = document.getContentStream(document.getContentStreamFileName()).getStream() ;
String path = "d:/pdf" ;
File dir = new File(path);
File file = new File(dir, "demo.pdf");
FileOutputStream out = new FileOutputStream(file) ;
byte[] bytes = new byte[stream.available()] ;
stream.read(bytes) ;
out.write(bytes) ;
out.close() ;      


help me please, thank you      

Outcomes