Author: martinc Date: Thu Jan 6 10:05:21 2005 New Revision: 124418 URL: http://svn.apache.org/viewcvs?view=rev&rev=124418 Log: Fix copy() to use the supplied buffer size. Modified: struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java
Modified: struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java Url: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java?view=diff&rev=124418&p1=struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java&r1=124417&p2=struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java&r2=124418 ============================================================================== --- struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java (original) +++ struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DownloadAction.java Thu Jan 6 10:05:21 2005 @@ -131,9 +131,9 @@ * * @throws IOException In case of an I/O problem */ - public static int copy(InputStream input, OutputStream output) + public int copy(InputStream input, OutputStream output) throws IOException { - byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; + byte[] buffer = new byte[getBufferSize()]; int count = 0; int n = 0; while (-1 != (n = input.read(buffer))) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]