FileOutputStream out = null;
try {
out = new FileOutputStream(new File(parentDir, outputFile));
TarArchiveOutputStream tOut = new TarArchiveOutputStream(
new GzipCompressorOutputStream(new BufferedOutputStream(out)));
for (int i = 0; i < inputFiles.length; i++) {
File f = new File(parentDir, inputFiles[i]);
TarArchiveEntry tarEntry = new TarArchiveEntry(f, f.getName());
tOut.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);