private void WriteObjectDummy(Java.IO.ObjectOutputStream destination) { destination.WriteInt(count); destination.WriteBoolean(isDirect); destination.WriteUTF(encoding); destination.WriteUTF(replace); }
static void WriteNullableString(Java.IO.ObjectOutputStream dest, string value) { dest.WriteBoolean(value != null); if (value != null) { dest.WriteUTF(value); } }
// 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()); } }
private void WriteObjectDummy(Java.IO.ObjectOutputStream destination) { }
static void WriteInt(Java.IO.ObjectOutputStream dest, int value) { dest.WriteInt(value); }
private void WriteObject(Java.IO.ObjectOutputStream destination) { WriteInt(destination, (int)Position); WriteNullableString(destination, Name); WriteNullableString(destination, Email); }