From: Robin Rosenberg Date: Thu, 11 Dec 2008 15:40:34 GMT Subject: Re: [JGIT PATCH 2/5] Add copy(InputStream) to TemporaryBuffer Message-ID: <200812111640.34435.robin.rosenberg@dewire.com> In-Reply-To: <1228971522-28764-3-git-send-email-spearce@spearce.org> torsdag 11 december 2008 05:58:39 skrev Shawn O. Pearce: > In some places we may find it ourselves with an InputStream we > need to copy into a TemporaryBuffer, so we can flatten out the > entire stream to a single byte[]. Putting the copy loop here > is more useful then duplicating it in application level code. > + public void copy(final InputStream in) throws IOException { > + final byte[] b = new byte[2048]; Why not 8192 here too? -- robin