Example #1
0
            /// <summary>
            /// Gets an float from the current offset relative to the start of the data part.
            /// </summary>
            public float GetFloat()
            {
                var x = Offset;

                Offset += 4;
                return(packet.GetFloat(x));
            }
Example #2
0
 /// <summary>
 /// Read an untagged value.
 /// </summary>
 private static object ReadUntaggedValue(JdwpPacket.DataReaderWriter readerWriter, Jdwp.Tag tag)
 {
     switch (tag)
     {
         case Jdwp.Tag.Array:
         case Jdwp.Tag.Object:
         case Jdwp.Tag.String:
         case Jdwp.Tag.Thread:
         case Jdwp.Tag.ThreadGroup:
         case Jdwp.Tag.ClassLoader:
         case Jdwp.Tag.ClassObject:
             return new ObjectId(readerWriter);
         case Jdwp.Tag.Byte:
             return readerWriter.GetByte();
         case Jdwp.Tag.Char:
             return (char)readerWriter.GetInt16();
         case Jdwp.Tag.Float:
             return readerWriter.GetFloat();
         case Jdwp.Tag.Double:
             return readerWriter.GetDouble();
         case Jdwp.Tag.Int:
             return readerWriter.GetInt();
         case Jdwp.Tag.Long:
             return readerWriter.GetLong();
         case Jdwp.Tag.Short:
             return readerWriter.GetInt16();
         case Jdwp.Tag.Void:
             return null;
         case Jdwp.Tag.Boolean:
             return readerWriter.GetBoolean();
         default:
             throw new ArgumentException("Unknown tag " + (int)tag);
     }
 }