The javadoc tells you the answer
" The copy methods use an internal buffer when copying. It is therefore advisable not to deliberately wrap the stream arguments to the copy methods in Buffered* streams "
Stephen
----- Original Message ----- From: "Carfield Yim" <[EMAIL PROTECTED]>
To: "Jakarta Commons Users List" <[email protected]>
Sent: Wednesday, February 09, 2005 2:16 PM
Subject: Should I buffered streams when using commons io?
Should I buffered streams when using commons io myself, like
CopyUtils.copy(new BufferedInputStream(new FileInputStream(file)), new BufferedOutputStream(res.getOutputStream()));
instead of CopyUtils.copy(new FileInputStream(file)), res.getOutputStream());
Or CopyUtil, IOUtil proper probably inside the API?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
