Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 17528 invoked from network); 28 Mar 2009 13:56:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2009 13:56:55 -0000 Received: (qmail 91383 invoked by uid 500); 28 Mar 2009 13:56:54 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 91283 invoked by uid 500); 28 Mar 2009 13:56:53 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 91273 invoked by uid 99); 28 Mar 2009 13:56:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Mar 2009 13:56:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.217.160 as permitted sender) Received: from [209.85.217.160] (HELO mail-gx0-f160.google.com) (209.85.217.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Mar 2009 13:56:46 +0000 Received: by gxk4 with SMTP id 4so647405gxk.18 for ; Sat, 28 Mar 2009 06:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=A9yoDBW8mZhOUHkzcUtX9C9yQ1sawRbD90x3TMQy68w=; b=FiRzCEozOOPEB8FvAqtm2+rIgQ+2hTHPbDd5X3QbYC6hz/S95E98b6R648kJyzqKFL OMAK+gh6WhcUrrjHcC+eMml9ytbuHmUX/k+7Hoz0qolrU6zq/31RoLVFh6sEYgOK39JO IypqzejEPTfBCrMhx7LqUm8XmElRPiiwYcYsM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=p4s2767fufhqh80bxyH22hOtntoGJIjzT5sYhsi0+hobBnovZeV/ZubP00A1Ip/155 OuxqrkyYScmTDwthHjDdXG7Sx/IjYyWXGl1ZSciy9i9CtOd2L+az972ljIH+sHIXFfIy 3vPmD0/wLqdbPRCosODZmLn9pzRmf83g+XDjs= MIME-Version: 1.0 Received: by 10.150.158.10 with SMTP id g10mr6236486ybe.166.1238248585091; Sat, 28 Mar 2009 06:56:25 -0700 (PDT) In-Reply-To: References: <25aac9fc0903280420r1b9829c5ide197cf868f9fa23@mail.gmail.com> Date: Sat, 28 Mar 2009 13:56:25 +0000 Message-ID: <25aac9fc0903280656p19d8a5dfwac6401aacefa4223@mail.gmail.com> Subject: Re: [COMPRESS] change IOUtils.copy() to return number of bytes copied? From: sebb To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Oops, sorry, the original message was supposed to be posted to the Commons Developer List. I'll forward it there - please don't reply further here, thanks!. On 28/03/2009, Christian Grobmeier wrote: > > IOUtils.copy() currently returns void. > > If it were changed to return a long of the number of bytes actually > > copied, then it could be used in the ArchiveInputStream test cases to > > check that the EOF was reached after the correct number of bytes. E.g. > > that would show whether any padding was being accidentally included. > > > > The only use of the class in the main code is in the ChangeSet class, > > but of course that does not have to use the return value, and the > > "wasted" code would be minimal. > > > > WDYT? > > > I think this would make sense and feels more consistent. > InputStream.read() returns the number of read bytes. If copy() would > do the same, this feels good to me. > > Christian > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org