Hi everyone,
I want to read 50-100 MB CSV file in java script rule to update the details in Alfresco data list. But I am getting Java Heap space issue on the below line of code.
var items = companyhome.childByNamePath("/Sites/datalists/documentLibrary/Demo.csv").content;
How can I solve this issue?
Thanks,
Yash
Hi,
ContentReader cr = fileFolderService.getReader(new NodeRef("noderef"));
InputStream fis = cr.getContentInputStream();Scanner sc = new Scanner(fis, "UTF-8");
while (sc.hasNextLine()) {
String line = sc.nextLine();
System.out.println(line);
}
With above code 55 MB file reading fine.Without any error.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.