qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r594881 - /incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java
Date Wed, 14 Nov 2007 13:50:52 GMT
Author: arnaudsimon
Date: Wed Nov 14 05:50:50 2007
New Revision: 594881

URL: http://svn.apache.org/viewvc?rev=594881&view=rev
Log:
changed for setting offset when buffers are fragmented

Modified:
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java?rev=594881&r1=594880&r2=594881&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java
(original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java
Wed Nov 14 05:50:50 2007
@@ -97,11 +97,13 @@
     protected void doGet(byte[] bytes)
     {
         int remaining = bytes.length;
+        int  offset = 0;
         while (remaining > 0)
         {
             preRead();
             int size = min(remaining, current.remaining());
-            current.get(bytes, 0, size);
+            current.get(bytes, offset, size);
+            offset += size;
             remaining -= size;
             postRead();
         }



Mime
View raw message