diff options
author | Arnaud Simon <arnaudsimon@apache.org> | 2007-11-14 13:50:50 +0000 |
---|---|---|
committer | Arnaud Simon <arnaudsimon@apache.org> | 2007-11-14 13:50:50 +0000 |
commit | 30e952c5e9e7084eb70633a543034fbc897a22b8 (patch) | |
tree | 47fc6506ccd29775fb3ff71618c6f1b84a4c37e9 | |
parent | 26f34cfdef50ed420e98e114b6735ceb898cc74a (diff) | |
download | qpid-python-30e952c5e9e7084eb70633a543034fbc897a22b8.tar.gz |
changed for setting offset when buffers are fragmented
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594881 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java b/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java index 76229a7ddd..474211ced2 100644 --- a/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java +++ b/java/common/src/main/java/org/apache/qpidity/transport/codec/FragmentDecoder.java @@ -97,11 +97,13 @@ public class FragmentDecoder extends AbstractDecoder 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(); } |