From 63ea9b500c9fd9fe665c7fa15e75c6c8ebebe249 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 3 Jun 2013 22:24:49 +0200 Subject: [PATCH] Fix read(byte[]) method. --- .../java/net/pterodactylus/sonitus/io/RememberingInputStream.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/net/pterodactylus/sonitus/io/RememberingInputStream.java b/src/main/java/net/pterodactylus/sonitus/io/RememberingInputStream.java index 5fae4b2..8c2e3e6 100644 --- a/src/main/java/net/pterodactylus/sonitus/io/RememberingInputStream.java +++ b/src/main/java/net/pterodactylus/sonitus/io/RememberingInputStream.java @@ -81,11 +81,7 @@ public class RememberingInputStream extends FilterInputStream { @Override public int read(byte[] bytes) throws IOException { - int read = super.read(bytes); - if (read != -1) { - rememberBuffer.write(bytes, 0, read); - } - return read; + return read(bytes, 0, bytes.length); } @Override -- 2.7.4