public Serialize ( System.Stream stream ) : void | ||
stream | System.Stream | The stream to write to. |
return | void |
public void Serialize(Stream stream)
{
//We don't care about the encoding, but we have to specify something to be able to set the stream as leave open.
using (BinaryWriter writer = new BinaryWriter(stream, Encoding.Default, true))
{
writer.Write(this.length);
foreach (Run r in this.runArray)
{
writer.Write(r.StartIndex);
writer.Write(r.EndIndex);
}
}
}