Skip to content

Commit

Permalink
Formats
Browse files Browse the repository at this point in the history
  • Loading branch information
federico-russo committed Apr 4, 2023
1 parent 214c001 commit 926dfe3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.codehaus.plexus.util.IOUtil;

import java.io.*;
import java.nio.file.Files;
import java.util.zip.GZIPOutputStream;

/**
Expand All @@ -26,7 +27,7 @@ protected void processFile(final File file) throws IOException {

final File gzipped = new File(file.getAbsolutePath() + ".gz");
getLog().debug(String.format("Compressing %s to %s", file.getName(), gzipped.getName()));
try (GZIPOutputStream out = new GZIPOutputStream(new FileOutputStream(gzipped));
try (GZIPOutputStream out = new GZIPOutputStream(Files.newOutputStream(gzipped.toPath()));
FileInputStream in = new FileInputStream(file)) {
IOUtil.copy(in, out);
}
Expand Down

0 comments on commit 926dfe3

Please sign in to comment.