public static string GetHexDump(ByteBuffer input)
        {
            int size = input.Remaining;
            if (size == 0)
            {
                return "empty";
            }
            
            StringBuilder output = new StringBuilder(size * 3 - 1);

            byte[] data = input.Array;
            int byteValue = data[0] & 0xFF;
            output.Append((char) highDigits[byteValue]);
            output.Append((char) lowDigits[byteValue]);            
            
            for (int i = 1 ; i < size; i++)
            {
                output.Append(' ');
                byteValue = data[i] & 0xFF;
                output.Append((char) highDigits[byteValue]);
                output.Append((char) lowDigits[byteValue]);
            }
            
            return output.ToString();
        }
Esempio n. 2
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     EncodingUtils.WriteShortStringBytes(buffer, Queue);
         buffer.Put(MessageCount);
         buffer.Put(ConsumerCount);
         		 
 }
Esempio n. 3
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     EncodingUtils.WriteShortStringBytes(buffer, String1);
         EncodingUtils.WriteLongstr(buffer, String2);
         buffer.Put(Operation);
         		 
 }
Esempio n. 4
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     String1 = EncodingUtils.ReadShortString(buffer);
     String2 = EncodingUtils.ReadLongstr(buffer);
     Operation = buffer.GetByte();
     		 
 }
Esempio n. 5
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     EncodingUtils.WriteShortStringBytes(buffer, Exchange);
         EncodingUtils.WriteShortStringBytes(buffer, RoutingKey);
         EncodingUtils.WriteShortStringBytes(buffer, Queue);
         		 
 }
Esempio n. 6
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Exchange = EncodingUtils.ReadShortString(buffer);
     RoutingKey = EncodingUtils.ReadShortString(buffer);
     Queue = EncodingUtils.ReadShortString(buffer);
     		 
 }
Esempio n. 7
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Table = EncodingUtils.ReadFieldTable(buffer);
     IntegerOp = buffer.GetByte();
     StringOp = buffer.GetByte();
     		 
 }
Esempio n. 8
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(Ticket);
         EncodingUtils.WriteShortStringBytes(buffer, Queue);
         EncodingUtils.WriteBooleans(buffer, new bool[]{NoAck});
         		 
 }
Esempio n. 9
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     EncodingUtils.WriteFieldTableBytes(buffer, Table);
         buffer.Put(IntegerOp);
         buffer.Put(StringOp);
         		 
 }
Esempio n. 10
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     PrefetchSize = buffer.GetUInt32();
     PrefetchCount = buffer.GetUInt16();
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Global = bools[0];
     		 
 }
Esempio n. 11
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(PrefetchSize);
         buffer.Put(PrefetchCount);
         EncodingUtils.WriteBooleans(buffer, new bool[]{Global});
         		 
 }
Esempio n. 12
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Queue = EncodingUtils.ReadShortString(buffer);
     MessageCount = buffer.GetUInt32();
     ConsumerCount = buffer.GetUInt32();
     		 
 }
Esempio n. 13
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ReplyCode = buffer.GetUInt16();
     ReplyText = EncodingUtils.ReadShortString(buffer);
     Details = EncodingUtils.ReadFieldTable(buffer);
     		 
 }
Esempio n. 14
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     EncodingUtils.WriteShortStringBytes(buffer, VirtualHost);
         EncodingUtils.WriteShortStringBytes(buffer, Capabilities);
         EncodingUtils.WriteBooleans(buffer, new bool[]{Insist});
         		 
 }
 public void WritePayload(ByteBuffer buffer)
 {
     foreach (IDataBlock block in _blocks)
     {
         block.WritePayload(buffer);
     }
 }
Esempio n. 16
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(ReplyCode);
         EncodingUtils.WriteShortStringBytes(buffer, ReplyText);
         EncodingUtils.WriteFieldTableBytes(buffer, Details);
         		 
 }
Esempio n. 17
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(ChannelMax);
         buffer.Put(FrameMax);
         buffer.Put(Heartbeat);
         		 
 }
Esempio n. 18
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ChannelMax = buffer.GetUInt16();
     FrameMax = buffer.GetUInt32();
     Heartbeat = buffer.GetUInt16();
     		 
 }
Esempio n. 19
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(Ticket);
         EncodingUtils.WriteShortStringBytes(buffer, Exchange);
         EncodingUtils.WriteBooleans(buffer, new bool[]{IfUnused, Nowait});
         		 
 }
Esempio n. 20
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     Ticket = buffer.GetUInt16();
     Queue = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Nowait = bools[0];
     		 
 }
Esempio n. 21
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     VirtualHost = EncodingUtils.ReadShortString(buffer);
     Capabilities = EncodingUtils.ReadShortString(buffer);
     bool[] bools = EncodingUtils.ReadBooleans(buffer);Insist = bools[0];
     		 
 }
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     EncodingUtils.WriteFieldTableBytes(buffer, ClientProperties);
         EncodingUtils.WriteShortStringBytes(buffer, Mechanism);
         EncodingUtils.WriteLongstr(buffer, Response);
         EncodingUtils.WriteShortStringBytes(buffer, Locale);
         		 
 }
Esempio n. 23
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(Ticket);
         EncodingUtils.WriteShortStringBytes(buffer, Exchange);
         EncodingUtils.WriteShortStringBytes(buffer, RoutingKey);
         EncodingUtils.WriteBooleans(buffer, new bool[]{Mandatory, Immediate});
         		 
 }
Esempio n. 24
0
 public void WritePayload(ByteBuffer buffer)
 {
     if (Payload != null)
     {
         buffer.Put(Payload);
         Payload.Rewind();
     }
 }
Esempio n. 25
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ReplyCode = buffer.GetUInt16();
     ReplyText = EncodingUtils.ReadShortString(buffer);
     ClassId = buffer.GetUInt16();
     MethodId = buffer.GetUInt16();
     		 
 }
Esempio n. 26
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(ReplyCode);
         EncodingUtils.WriteShortStringBytes(buffer, ReplyText);
         buffer.Put(ClassId);
         buffer.Put(MethodId);
         		 
 }
Esempio n. 27
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(Ticket);
         EncodingUtils.WriteShortStringBytes(buffer, Queue);
         EncodingUtils.WriteBooleans(buffer, new bool[]{Passive, Durable, Exclusive, AutoDelete, Nowait});
         EncodingUtils.WriteFieldTableBytes(buffer, Arguments);
         		 
 }
Esempio n. 28
0
 protected override void WriteMethodPayload(ByteBuffer buffer)
 {
     buffer.Put(ReplyCode);
         EncodingUtils.WriteShortStringBytes(buffer, ReplyText);
         EncodingUtils.WriteShortStringBytes(buffer, Exchange);
         EncodingUtils.WriteShortStringBytes(buffer, RoutingKey);
         		 
 }
Esempio n. 29
0
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ReplyCode = buffer.GetUInt16();
     ReplyText = EncodingUtils.ReadShortString(buffer);
     Exchange = EncodingUtils.ReadShortString(buffer);
     RoutingKey = EncodingUtils.ReadShortString(buffer);
     		 
 }
 protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
 {
     ClientProperties = EncodingUtils.ReadFieldTable(buffer);
     Mechanism = EncodingUtils.ReadShortString(buffer);
     Response = EncodingUtils.ReadLongstr(buffer);
     Locale = EncodingUtils.ReadShortString(buffer);
     		 
 }