From: Mathieu Baudier Date: Tue, 12 Dec 2023 11:02:41 +0000 (+0100) Subject: Improve documentation X-Git-Tag: v2.3.24~4 X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=commitdiff_plain;h=0ed0d9deed7c0a4c65c1363e083b904a9ba46057 Improve documentation --- 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);