summaryrefslogtreecommitdiff
path: root/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.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
commitad8fa512e788075a4573678738b6f11f1c8cbd59 (patch)
tree69eef3dfec5848f489a9f129237e38ae35b3079c /qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
parent4e1735463fdb63f87d03541c33a816a5c7af563f (diff)
downloadqpid-python-ad8fa512e788075a4573678738b6f11f1c8cbd59.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@486248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs')
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs b/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
index f76ac005e4..30be63013a 100644
--- a/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
+++ b/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
@@ -51,11 +51,11 @@ namespace Qpid.Framing
}
// final +1 represents the command end which we know we must require even
// if there is an empty body
- if (input.Remaining < 1)
+ if (input.remaining() < 1)
{
return MessageDecoderResult.NEED_DATA;
}
- byte type = input.Get();
+ byte type = input.get();
// we have to check this isn't a protocol initiation frame here - we can't tell later on and we end up
// waiting for more data. This could be improved if MINA supported some kind of state awareness when decoding
@@ -65,7 +65,7 @@ namespace Qpid.Framing
return MessageDecoderResult.NOT_OK;
}
// zero, channel, body size and end byte
- if (input.Remaining < (1 + 2 + 4 + 1))
+ if (input.remaining() < (1 + 2 + 4 + 1))
{
return MessageDecoderResult.NEED_DATA;
}
@@ -80,7 +80,7 @@ namespace Qpid.Framing
return MessageDecoderResult.NOT_OK;
}
- if (input.Remaining < (bodySize + 1))
+ if (input.remaining() < (bodySize + 1))
{
return MessageDecoderResult.NEED_DATA;
}
@@ -116,7 +116,7 @@ namespace Qpid.Framing
protected Object CreateAndPopulateFrame(ByteBuffer input)
{
- byte type = input.Get();
+ byte type = input.get();
ushort channel = input.GetUnsignedShort();
uint bodySize = input.GetUnsignedInt();
@@ -129,7 +129,7 @@ namespace Qpid.Framing
frame.PopulateFromBuffer(input, channel, bodySize, bodyFactory);
- byte marker = input.Get();
+ byte marker = input.get();
//assert marker == 0xCE;
return frame;
}