From 8eb6c6b0ca47cd380ae5b53aa7b7219082ce3f84 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 26 Mar 2017 17:34:15 +0300 Subject: [PATCH] Fix stream copying --- .../uurimustoo/algoritmidetest/compressors/CompressZip.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/mikroskeem/uurimustoo/algoritmidetest/compressors/CompressZip.java b/src/main/java/eu/mikroskeem/uurimustoo/algoritmidetest/compressors/CompressZip.java index 2ba40f1..67ed9fb 100644 --- a/src/main/java/eu/mikroskeem/uurimustoo/algoritmidetest/compressors/CompressZip.java +++ b/src/main/java/eu/mikroskeem/uurimustoo/algoritmidetest/compressors/CompressZip.java @@ -21,7 +21,7 @@ public class CompressZip extends AbstractCompressor { out.putNextEntry(ze); byte[] buf = new byte[8192]; int s; - while((s = inputStream.read()) != -1){ + while((s = inputStream.read(buf)) != -1){ out.write(buf, 0, s); } out.closeEntry();