Details

Description

The javadoc for IOUtils.copy says:
"Large streams (over 2GB) will return a bytes copied value of -1 after the copy has completed since the correct number of bytes cannot be returned as an int."
but then it says:
"Throws:
ArithmeticException - if the byte count is too large"
This is an inconsistency since -1 is always returned if the byte count is too large. ArithmeticException is never actually thrown.

See IO-84 for discussion on solving the "too large byte count" problem.