I am using Apache commons-compress 1.12 to compress a folder. The parent folder that I am trying to compress has files and more subfolders with files. After compressing, I am trying to place the compressed file in the parent folder itself. I have written code that is written in the answer of
http://stackoverflow.com/questions/13461393/compress-directory-to-tar-gz-with-commons-compress
But I am getting an error - java.io.IOException: This archives contains unclosed entries
. I am using version 2.5 of apache commons-io. What could be the reason for the error?