コード例 #1
0
 private void WriteObjectDummy(Java.IO.ObjectOutputStream destination)
 {
     destination.WriteInt(count);
     destination.WriteBoolean(isDirect);
     destination.WriteUTF(encoding);
     destination.WriteUTF(replace);
 }
コード例 #2
0
 static void WriteNullableString(Java.IO.ObjectOutputStream dest, string value)
 {
     dest.WriteBoolean(value != null);
     if (value != null)
     {
         dest.WriteUTF(value);
     }
 }
コード例 #3
0
 // utilty methods for testing serialization
 protected byte[] ConvertToBytes(Java.Lang.Object obj)
 {
     //   var bf = new BinaryFormatter();
     //using (var ms = new MemoryStream())
     //{
     //    bf.Serialize(ms, obj);
     //    return ms.ToArray();
     //}
     using (var bos = new MemoryStream())
         using (var oos = new Java.IO.ObjectOutputStream(bos))
         {
             oos.WriteObject(obj);
             return(bos.ToArray());
         }
 }
コード例 #4
0
 private void WriteObjectDummy(Java.IO.ObjectOutputStream destination)
 {
 }
コード例 #5
0
 static void WriteInt(Java.IO.ObjectOutputStream dest, int value)
 {
     dest.WriteInt(value);
 }
コード例 #6
0
 private void WriteObject(Java.IO.ObjectOutputStream destination)
 {
     WriteInt(destination, (int)Position);
     WriteNullableString(destination, Name);
     WriteNullableString(destination, Email);
 }