Author: sebb Date: Thu Jan 7 02:36:02 2010 New Revision: 896739 URL: http://svn.apache.org/viewvc?rev=896739&view=rev Log: IO-223 IOUtils.copy Javadoc inconsistency (return -1 vs. throw ArithmeticException)
Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java?rev=896739&r1=896738&r2=896739&view=diff ============================================================================== --- commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java (original) +++ commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java Thu Jan 7 02:36:02 2010 @@ -1129,10 +1129,9 @@ * * @param input the <code>InputStream</code> to read from * @param output the <code>OutputStream</code> to write to - * @return the number of bytes copied + * @return the number of bytes copied, or -1 if > Integer.MAX_VALUE * @throws NullPointerException if the input or output is null * @throws IOException if an I/O error occurs - * @throws ArithmeticException if the byte count is too large * @since Commons IO 1.1 */ public static int copy(InputStream input, OutputStream output) throws IOException { @@ -1234,10 +1233,9 @@ * * @param input the <code>Reader</code> to read from * @param output the <code>Writer</code> to write to - * @return the number of characters copied + * @return the number of characters copied, or -1 if > Integer.MAX_VALUE * @throws NullPointerException if the input or output is null * @throws IOException if an I/O error occurs - * @throws ArithmeticException if the character count is too large * @since Commons IO 1.1 */ public static int copy(Reader input, Writer output) throws IOException {