Hi everyone,I know that there is a lot of information on the web about how to download a file using the webservice client, but i couldn't find anything about my problem.The problem is that i can download a file from the alfresco's repo but the file is always incomplete, i really dont know how to change this. Here's my code: public static Content download(String name, Reference folder,
AuthenticationDetails session) throws NodeAlfrescoException {
Content content = null;
try {
AuthenticationUtils.setAuthenticationDetails(session);
String alfrescoRoot = Utils.appProperties().getProperty("alfresco.url");
alfrescoRoot += "api";
WebServiceFactory.setEndpointAddress(alfrescoRoot);
Reference ref = new Reference(STORE, null, folder.getPath()
+ "/cm:" + name);
Content[] read = getContentService().read(
new Predicate(new Reference[]{ref}, STORE, null),
Constants.PROP_CONTENT);
content = read[0];
} catch (Exception e) {
e.printStackTrace();
throw new NodeAlfrescoException();
}
return content;
}
Please any helpThanks in Advance!!