public void WriteExternal(IDataOutput output)
        {
            var bytes = Encoding.UTF8.GetBytes(Json);

            output.WriteInt32(bytes.Length);
            output.WriteBytes(bytes);
        }
        public void WriteExternal(IDataOutput output)
        {
            var bytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(this));

            output.WriteInt32(bytes.Length);
            output.WriteBytes(bytes);
        }
        public void WriteExternal(IDataOutput output)
        {
            var bytes = Encoding.UTF8.GetBytes(Json);

            output.WriteInt32(bytes.Length);
            output.WriteBytes(bytes);
        }
Beispiel #4
0
        public void WriteExternal(IDataOutput output)
        {
            string json = JsonConvert.SerializeObject(Data);

            byte[] b = Encoding.UTF8.GetBytes(json);
            output.WriteByte((byte)(b.Length >> 24));
            output.WriteByte((byte)(b.Length >> 16));
            output.WriteByte((byte)(b.Length >> 8));
            output.WriteByte((byte)(b.Length));
            output.WriteBytes(b);
        }
 public void WriteExternal(IDataOutput output)
 {
     Dictionary<string, object> dict = new Dictionary<string, object>();
     foreach (var x in this)
         dict[x.Key] = x.Value;
     string json = Serializer.Serialize(dict);
     byte[] b = Encoding.UTF8.GetBytes(json);
     output.WriteByte((byte)(b.Length >> 24));
     output.WriteByte((byte)(b.Length >> 16));
     output.WriteByte((byte)(b.Length >> 8));
     output.WriteByte((byte)(b.Length));
     output.WriteBytes(b);
     
 }
Beispiel #6
0
        public void WriteExternal(IDataOutput output)
        {
            Dictionary <string, object> dict = new Dictionary <string, object>();

            foreach (var x in this)
            {
                dict[x.Key] = x.Value;
            }
            string json = Serializer.Serialize(dict);

            byte[] b = Encoding.UTF8.GetBytes(json);
            output.WriteByte((byte)(b.Length >> 24));
            output.WriteByte((byte)(b.Length >> 16));
            output.WriteByte((byte)(b.Length >> 8));
            output.WriteByte((byte)(b.Length));
            output.WriteBytes(b);
        }
 protected void method_9(IDataOutput param1)
 {
     param1.WriteInt(param1.Shift(this.size, 27));
     param1.WriteShort(-14943);
     param1.WriteBytes(this.code);
 }
 /// <summary>
 /// 写入一个字节数组.
 /// </summary>
 /// <param name="output">输出流对象.</param>
 /// <param name="value">要写入的数据.</param>
 public static void WriteBytes(IDataOutput output, byte[] value)
 {
     output.WriteUnsignedInt((uint)value.Length);
     output.WriteBytes(value);
 }
 protected void method_9(IDataOutput param1)
 {
     param1.WriteBytes(this.var_4280);
 }
Beispiel #10
0
 protected void method_9(IDataOutput param1)
 {
     param1.WriteShort(866);
     param1.WriteShort(-4575);
     param1.WriteBytes(this.var_3596);
 }