Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 52889 invoked from network); 9 Feb 2005 21:41:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Feb 2005 21:41:43 -0000 Received: (qmail 16509 invoked by uid 500); 9 Feb 2005 21:41:39 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 16452 invoked by uid 500); 9 Feb 2005 21:41:39 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 16437 invoked by uid 99); 9 Feb 2005 21:41:39 -0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp806.mail.ukl.yahoo.com (HELO smtp806.mail.ukl.yahoo.com) (217.12.12.196) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 09 Feb 2005 13:41:37 -0800 Received: from unknown (HELO SCOLEBOURNE) (carfield@carfield.com.hk@81.154.207.147 with poptime) by smtp806.mail.ukl.yahoo.com with SMTP; 9 Feb 2005 21:41:34 -0000 Message-ID: <000501c50ef0$266329a0$93cf9a51@SCOLEBOURNE> From: "Stephen Colebourne" To: "Jakarta Commons Users List" , References: <20050209134051.A0E732C23A@mail.ligas.de> Subject: Re: [io] Should I buffered streams when using commons io? Date: Wed, 9 Feb 2005 21:41:43 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Antivirus: avast! (VPS 0506-0, 08/02/2005), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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" To: "Jakarta Commons Users List" 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