summaryrefslogtreecommitdiff
path: root/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
diff options
context:
space:
mode:
authorSteven Shaw <steshaw@apache.org>2006-12-12 17:36:17 +0000
committerSteven Shaw <steshaw@apache.org>2006-12-12 17:36:17 +0000
commitb10ee442673d6d9c8abb46bd7a0606364930130d (patch)
tree07827981760e15f8dcf5f5af892c3a0bad2eba66 /dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
parent7d0a7581134379324b36d78f8c49dcd793d1ab1e (diff)
downloadqpid-python-b10ee442673d6d9c8abb46bd7a0606364930130d.tar.gz
QPID-139. Initial (re)port of MINA's bytebuffer abstraction. Now includes the autoexpand feature. References to java.nio.Buffer were replaced with FixedByteBuffer and necessary methods added and implemented. FixedByteBuffer delegates to our existing HeapByteBuffer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@486248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs')
-rw-r--r--dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs b/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
index dd9855d675..ad1bc55d87 100644
--- a/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
+++ b/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
@@ -62,20 +62,20 @@ namespace Qpid.Client.Message
if (bodies != null && bodies.Count == 1)
{
_logger.Debug("Non-fragmented message body (bodySize=" + contentHeader.BodySize +")");
- data = HeapByteBuffer.wrap(((ContentBody)bodies[0]).Payload);
+ data = ByteBuffer.wrap(((ContentBody)bodies[0]).Payload);
}
else
{
_logger.Debug("Fragmented message body (" + bodies.Count + " frames, bodySize=" + contentHeader.BodySize + ")");
- data = ByteBuffer.Allocate((int)contentHeader.BodySize); // XXX: Is cast a problem?
+ data = ByteBuffer.allocate((int)contentHeader.BodySize); // XXX: Is cast a problem?
foreach (ContentBody body in bodies) {
- data.Put(body.Payload);
+ data.put(body.Payload);
//body.Payload.Release();
}
- data.Flip();
+ data.flip();
}
- _logger.Debug("Creating message from buffer with position=" + data.Position + " and remaining=" + data.Remaining);
+ _logger.Debug("Creating message from buffer with position=" + data.position() + " and remaining=" + data.remaining());
return CreateMessage(messageNbr, data, contentHeader);
}