From: David ‘Bombe’ Roden Date: Mon, 3 Jun 2013 20:24:49 +0000 (+0200) Subject: Fix read(byte[]) method. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=63ea9b500c9fd9fe665c7fa15e75c6c8ebebe249;p=sonitus.git Fix read(byte[]) method. --- 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