<?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: My Mistake With readBytes in AIR</title>
	<atom:link href="http://shang-liang.com/blog/readbytes-in-air/feed/" rel="self" type="application/rss+xml" />
	<link>http://shang-liang.com/blog/readbytes-in-air/</link>
	<description>Life in a Flash</description>
	<lastBuildDate>Sat, 10 Jul 2010 16:14:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: alex</title>
		<link>http://shang-liang.com/blog/readbytes-in-air/comment-page-1/#comment-754</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Sun, 17 May 2009 10:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://shang-liang.com/blog/?p=80#comment-754</guid>
		<description>sorry, the last line of that code should have read
fs.writeBytes(bArray, 0, bArray.length).</description>
		<content:encoded><![CDATA[<p>sorry, the last line of that code should have read<br />
fs.writeBytes(bArray, 0, bArray.length).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://shang-liang.com/blog/readbytes-in-air/comment-page-1/#comment-753</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Sun, 17 May 2009 10:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://shang-liang.com/blog/?p=80#comment-753</guid>
		<description>Hi there, ive been having a similar problem:

filestream.writeBytes(byteArray, 0 , byteArray.length).

I have been wanting to write the Bytes from say 18000 bytes to the byteArray.length (which is 20000 bytes). Is there a way to do this? i have trieds setting the offset to 18000, but it always returns the index out of range, and what you have outlined above seems to be the same problem.

var f : File = File.desktopDirectory.resolvePath(&quot;stream.mp3&quot;);
			var fs : FileStream = new FileStream();
fs.openAsync(f, FileMode.WRITE);	
			var bArray : ByteArray = new ByteArray();
stream.readBytes(bArray);
fs.writeBytes(_newerBArray, 0, _newerBArray.length);

so i would need to set the fs.position to a position in the bytearray? sorry about all the questions, it just seems no one else has documented this and its driving me a bit mad!

thanks</description>
		<content:encoded><![CDATA[<p>Hi there, ive been having a similar problem:</p>
<p>filestream.writeBytes(byteArray, 0 , byteArray.length).</p>
<p>I have been wanting to write the Bytes from say 18000 bytes to the byteArray.length (which is 20000 bytes). Is there a way to do this? i have trieds setting the offset to 18000, but it always returns the index out of range, and what you have outlined above seems to be the same problem.</p>
<p>var f : File = File.desktopDirectory.resolvePath(&#8220;stream.mp3&#8243;);<br />
			var fs : FileStream = new FileStream();<br />
fs.openAsync(f, FileMode.WRITE);<br />
			var bArray : ByteArray = new ByteArray();<br />
stream.readBytes(bArray);<br />
fs.writeBytes(_newerBArray, 0, _newerBArray.length);</p>
<p>so i would need to set the fs.position to a position in the bytearray? sorry about all the questions, it just seems no one else has documented this and its driving me a bit mad!</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi</title>
		<link>http://shang-liang.com/blog/readbytes-in-air/comment-page-1/#comment-748</link>
		<dc:creator>Ravi</dc:creator>
		<pubDate>Tue, 07 Apr 2009 14:08:18 +0000</pubDate>
		<guid isPermaLink="false">http://shang-liang.com/blog/?p=80#comment-748</guid>
		<description>Thanks for the blog this helped me a lot...</description>
		<content:encoded><![CDATA[<p>Thanks for the blog this helped me a lot&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
