tarArchiveOutputStream = new TarArchiveOutputStream(gzipOutputStream);
addFilesInDirectory(tarArchiveOutputStream, sourceDirectory);
} finally {
if (tarArchiveOutputStream != null) {
tarArchiveOutputStream.finish();
}
if (tarArchiveOutputStream != null) {
tarArchiveOutputStream.close();
}
if (gzipOutputStream != null) {