From a09479d87b08405ab24ff87abd1a47ac8ca29165 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Tue, 28 May 2019 23:19:25 +0200 Subject: [PATCH] woopsie --- src/be/nikiroo/utils/CacheMemory.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; } /** -- 2.27.0