I am trying to create a zip file with collection of files. I used java.nio.Files class to do this:
Files.copy( toBeAdded,internalTargetPath,
StandardCopyOption.REPLACE_EXISTING );
It is running out of heap memory due to file size is around 670MB, so is their anyway to do copy with chunks.