Thank you Michael,<div><br></div><div>I would appreciate to look at your whole application KarmaDecoder!</div><div><br></div><div>- Bertrand<br><br><div class="gmail_quote">2009/9/11 Michael McGrady <span dir="ltr">&lt;<a href="mailto:mmcgrady@topiatechnology.com">mmcgrady@topiatechnology.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am happy with the performance I get from using the NIO stream chunks<br>
in the KarmaDecoder that is in the archives.  There have been updates<br>
to this in the archives with significant improvements so be sure to<br>
look at the latest.  Eventually I will provide the whole app.<br>
<br>
Mike<br>
<div><div></div><div class="h5"><br>
<br>
On Sep 11, 2009, at 9:15 AM, bgoetzmann wrote:<br>
<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; In my custom handler&#39;s messageReceived, I would like write bytes<br>
&gt; contained<br>
&gt; in the ChannelBuffer instance into a file using a RandomAccessFile<br>
&gt; instance;<br>
&gt; so, a simple approach could be (where raf is the RandomAccessFile<br>
&gt; reference):<br>
&gt;<br>
&gt; ChannelBuffer buf = (ChannelBuffer) e.getMessage();<br>
&gt; while(buf.readable()) {<br>
&gt;    raf.writeByte(buf.readByte());<br>
&gt; }<br>
&gt;<br>
&gt; It works, but I think there is a more quick approach! Any idea?<br>
&gt;<br>
&gt; Thank you.<br>
&gt;<br>
&gt; Bertrand.<br>
&gt; --<br>
&gt; View this message in context: <a href="http://n2.nabble.com/Reading-bytes-from-ChannelBuffer-writing-with-RandomAccessFile-tp3626803p3626803.html" target="_blank">http://n2.nabble.com/Reading-bytes-from-ChannelBuffer-writing-with-RandomAccessFile-tp3626803p3626803.html</a><br>

&gt; Sent from the Netty User Group mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; netty-users mailing list<br>
&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
<br>
</div></div>Mike McGrady<br>
Principal Investigator AF081-028 AFRL SBIR<br>
Senior Engineer<br>
Topia Technology, Inc<br>
1.253.720.3365<br>
<a href="mailto:mmcgrady@topiatechnology.com">mmcgrady@topiatechnology.com</a><br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
</div></div></blockquote></div><br></div>