From: Niki Roo Date: Tue, 28 May 2019 21:19:25 +0000 (+0200) Subject: woopsie X-Git-Tag: fanfix-swing-0.0.1~21^2~37 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=a09479d87b08405ab24ff87abd1a47ac8ca29165;p=fanfix-swing.git woopsie --- diff --git a/src/be/nikiroo/utils/CacheMemory.java b/src/be/nikiroo/utils/CacheMemory.java index 8f9e7253..232b6324 100644 --- a/src/be/nikiroo/utils/CacheMemory.java +++ b/src/be/nikiroo/utils/CacheMemory.java @@ -70,13 +70,17 @@ public class CacheMemory extends Cache { } @Override - public void save(InputStream in, String uniqueID) throws IOException { - data.put(getKey(uniqueID), IOUtils.toByteArray(in)); + public long save(InputStream in, String uniqueID) throws IOException { + byte[] bytes = IOUtils.toByteArray(in); + data.put(getKey(uniqueID), bytes); + return bytes.length; } @Override - public void save(InputStream in, URL url) throws IOException { - data.put(getKey(url), IOUtils.toByteArray(in)); + public long save(InputStream in, URL url) throws IOException { + byte[] bytes = IOUtils.toByteArray(in); + data.put(getKey(url), bytes); + return bytes.length; } /**