示例#1
0
文件: WriteData.cs 项目: ikvm/test
        private static void WriteBytes(byte[] data, int size, Stream outStream, int sectorSize)
        {
            outStream.Write(data, 0, size);
            int num = CompoundFileData.Padding(size, sectorSize);

            for (int i = 0; i < num; i++)
            {
                outStream.WriteByte(0);
            }
        }
示例#2
0
文件: WriteData.cs 项目: ikvm/test
        private void WriteDirectoryStream(BinaryWriter bw)
        {
            foreach (CompoundFileData.RedBlackTreeNode node in this.nodes)
            {
                this.WriteDirectoryNode(bw, node);
            }
            int streamSize = this.nodes.Count * 128;
            int num2       = CompoundFileData.Padding(streamSize, base.sectorSize);

            for (int i = 0; i < num2; i++)
            {
                bw.Write(0);
            }
        }
示例#3
0
文件: WriteData.cs 项目: ikvm/test
 private void WriteMATRemainder(BinaryWriter bw)
 {
     if (base.SATSectorCount > 0x6d)
     {
         for (int i = 0x6d; i < base.SATSectorCount; i++)
         {
             bw.Write(base.sectorAllocationTableSID + i);
         }
         int streamSize = (base.SATSectorCount - 0x6d) * 4;
         int num3       = CompoundFileData.Padding(streamSize, base.sectorSize) / 4;
         for (int j = 0; j < num3; j++)
         {
             bw.Write(-1);
         }
     }
 }
示例#4
0
文件: WriteData.cs 项目: ikvm/test
        private void WriteAllocationTable(BinaryWriter bw, ArrayList allocationTable)
        {
            //using (
            IEnumerator enumerator = allocationTable.GetEnumerator();    //)
            {
                while (enumerator.MoveNext())
                {
                    int num = (int)enumerator.Current; // *(enumerator.get_Current());
                    bw.Write(num);
                }
            }
            int streamSize = allocationTable.Count * 4;
            int num3       = CompoundFileData.Padding(streamSize, base.sectorSize) / 4;

            for (int i = 0; i < num3; i++)
            {
                bw.Write(-1);
            }
        }