You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2005/02/09 22:41:43 UTC

Re: [io] Should I buffered streams when using commons io?

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" <ca...@gmail.com>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
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: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org