<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: IO performance &#8211; Tar vs. File vs. Byte streams</title>
	<atom:link href="http://chaoticjava.com/posts/io-performance-tar-file-bytes/feed/" rel="self" type="application/rss+xml" />
	<link>http://chaoticjava.com/posts/io-performance-tar-file-bytes/</link>
	<description>The internet, design patterns, frameworks and Java</description>
	<lastBuildDate>Wed, 08 Sep 2010 10:18:29 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Aviad</title>
		<link>http://chaoticjava.com/posts/io-performance-tar-file-bytes/comment-page-1/#comment-44374</link>
		<dc:creator>Aviad</dc:creator>
		<pubDate>Mon, 08 Dec 2008 21:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://chaoticjava.com/?p=240#comment-44374</guid>
		<description>@Omry: Correct, my mistake. Through our talks on the subject off-blog, I&#039;ve realised I completely forgot about DataInputStream!</description>
		<content:encoded><![CDATA[<p>@Omry: Correct, my mistake. Through our talks on the subject off-blog, I&#8217;ve realised I completely forgot about DataInputStream!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omry</title>
		<link>http://chaoticjava.com/posts/io-performance-tar-file-bytes/comment-page-1/#comment-44293</link>
		<dc:creator>Omry</dc:creator>
		<pubDate>Sun, 07 Dec 2008 10:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://chaoticjava.com/?p=240#comment-44293</guid>
		<description>A small mistake:

byte[] bytes = new byte[file.length()];
stream.read(bytes);

is not guaranties to read enough data to fill up the entire array, quoting the javadoc from FileInputStream:
     * Reads up to &lt;code&gt;b.length&lt;/code&gt; bytes of data from this input
     * stream into an array of bytes. This method blocks until some input
     * is available.

about tar performance, I am not surprise.
the overhead of opening many files can be significant.
you will find that the operating system and file system also plays a major role in file IO performance.</description>
		<content:encoded><![CDATA[<p>A small mistake:</p>
<p>byte[] bytes = new byte[file.length()];<br />
stream.read(bytes);</p>
<p>is not guaranties to read enough data to fill up the entire array, quoting the javadoc from FileInputStream:<br />
     * Reads up to <code>b.length</code> bytes of data from this input<br />
     * stream into an array of bytes. This method blocks until some input<br />
     * is available.</p>
<p>about tar performance, I am not surprise.<br />
the overhead of opening many files can be significant.<br />
you will find that the operating system and file system also plays a major role in file IO performance.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
