Hi Team,
i am trying to down load file with apache openCMIS from documentum repository with below code but it is writting as empty file
CmisObject object = session.getObject(ObjectID);
Document document = (Document) object;
ContentStream stream = document.getContentStream();
InputStream is = stream.getStream();
String filename = document.getName();
File f = new File("c:/"+filename);
OutputStream out = new FileOutputStream(f);
byte buf[]=new byte[1024*1024];
int len;
while((len=is.read(buf))>0){
out.write(buf,0,len);
}
out.close();
is.close();
Please let me know if any idea.