commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [io] Should I buffered streams when using commons io?
Date Wed, 09 Feb 2005 21:41:43 GMT
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" <carfield@gmail.com>
To: "Jakarta Commons Users List" <commons-user@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


Mime
View raw message