Use NIO in test.
@@ -51,9 +51,8 @@ public void testXZUnarchive() throws Exception {
final File input = getFile("bla.tar.xz");
final File output = new File(dir, "bla.tar");
try (InputStream is = Files.newInputStream(input.toPath())) {
- try (CompressorInputStream in = new CompressorStreamFactory().createCompressorInputStream("xz", is);
- OutputStream out = Files.newOutputStream(output.toPath())) {
- IOUtils.copy(in, out);
+ try (CompressorInputStream in = new CompressorStreamFactory().createCompressorInputStream("xz", is)) {
+ Files.copy(in, output.toPath());
}
}
}
