X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Futil%2FStreamUtils.java;h=f4242e6c273bbea6de0dd392256d40915109b9f6;hb=0ed0d9deed7c0a4c65c1363e083b904a9ba46057;hp=5fbef6b31a6889f9ba3276150032988214d0e293;hpb=064d1d5cd117b8c2b8eccd4751c20065fdde1c5f;p=lgpl%2Fargeo-commons.git 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);