public void Write(Stream output)
{
if (this._zoneData.Count != (Int32)this._numZoneData)
{
SwfFormatException e = new SwfFormatException("The count of List<ZoneData> and the byte value of zone data differs. ");
Log.Error(this, e.Message);
throw e;
}
output.WriteByte(this._numZoneData);
for (int i = 0; i < this._zoneData.Count; i++)
{
this._zoneData[i].Write(output);
}
BitStream bits = new BitStream(output);
bits.WriteBits(6, 0); //reserved
bits.WriteBits(1, Convert.ToInt32(this._zoneMaskY));
bits.WriteBits(1, Convert.ToInt32(this._zoneMaskX));
}