示例#1
0
 internal virtual void WriteBlocks(Stream stream)
 {
     if (this.Valid)
     {
         if (this.writer != null)
         {
             DocumentOutputStream stream2 = new DocumentOutputStream(stream, this.size);
             //OnBeforeWriting(new POIFSWriterEventArgs(stream2, this.path, this.name, this.size));
             writer.ProcessPOIFSWriterEvent(new POIFSWriterEvent(stream2, path, name, size));
             stream2.WriteFiller(this.CountBlocks * POIFSConstants.BIG_BLOCK_SIZE, DocumentBlock.FillByte);
         }
         else
         {
             for (int i = 0; i < this.bigBlocks.Length; i++)
             {
                 this.bigBlocks[i].WriteBlocks(stream);
             }
         }
     }
 }