From 0ed0d9deed7c0a4c65c1363e083b904a9ba46057 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Tue, 12 Dec 2023 12:02:41 +0100 Subject: [PATCH] Improve documentation --- .../src/org/argeo/cms/util/StreamUtils.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/org.argeo.cms/src/org/argeo/cms/util/StreamUtils.java b/org.argeo.cms/src/org/argeo/cms/util/StreamUtils.java index 5fbef6b31..f4242e6c2 100644 --- a/org.argeo.cms/src/org/argeo/cms/util/StreamUtils.java +++ b/org.argeo.cms/src/org/argeo/cms/util/StreamUtils.java @@ -16,13 +16,9 @@ import java.util.StringJoiner; public class StreamUtils { private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; - /* - * APACHE COMMONS IO (inspired) - */ - /** @return the number of bytes */ - public static Long copy(InputStream in, OutputStream out) throws IOException { - Long count = 0l; + public static long copy(InputStream in, OutputStream out) throws IOException { + long count = 0l; byte[] buf = new byte[DEFAULT_BUFFER_SIZE]; while (true) { int length = in.read(buf); @@ -35,8 +31,8 @@ public class StreamUtils { } /** @return the number of chars */ - public static Long copy(Reader in, Writer out) throws IOException { - Long count = 0l; + public static long copy(Reader in, Writer out) throws IOException { + long count = 0l; char[] buf = new char[DEFAULT_BUFFER_SIZE]; while (true) { int length = in.read(buf); -- 2.30.2