diff options
-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(); } |