public int read()

in commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MultipartInput.java [373:390]


        public int read(final byte[] b, final int off, final int len) throws IOException {
            checkOpen();
            if (len == 0) {
                return 0;
            }
            var res = available();
            if (res == 0) {
                res = makeAvailable();
                if (res == 0) {
                    return -1;
                }
            }
            res = Math.min(res, len);
            System.arraycopy(buffer, head, b, off, res);
            head += res;
            total += res;
            return res;
        }