Improve documentation
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 12 Dec 2023 11:02:41 +0000 (12:02 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 12 Dec 2023 11:02:41 +0000 (12:02 +0100)
org.argeo.cms/src/org/argeo/cms/util/StreamUtils.java

index 5fbef6b31a6889f9ba3276150032988214d0e293..f4242e6c273bbea6de0dd392256d40915109b9f6 100644 (file)
@@ -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);