BN089-BS开发框架MVC4版/source20131023/Zephyr.Net/Zephyr.Utils/Document/Excel/ExcelLibrary/Office/CompoundDocumentFormat/CompoundDocument_Read.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using QiHe.CodeLib;
namespace Zephyr.Utils.ExcelLibrary.CompoundDocumentFormat
{
public partial class CompoundDocument
{
public static CompoundDocument Load(string file)
{
CompoundDocument doc = CompoundDocument.Open(file);
doc.ReadAllStreamData();
doc.Close();
return doc;
}
public static CompoundDocument Load(Stream stream)
{
CompoundDocument doc = CompoundDocument.Open(stream);
doc.ReadAllStreamData();
doc.Close();
return doc;
}
private static FileHeader ReadHeader(BinaryReader reader)
{
FileHeader header = new FileHeader();
header.FileTypeIdentifier = reader.ReadBytes(8);
header.FileIdentifier = new Guid(reader.ReadBytes(16));
header.RevisionNumber = reader.ReadUInt16();
header.VersionNumber = reader.ReadUInt16();
header.ByteOrderMark = reader.ReadBytes(2);
header.SectorSizeInPot = reader.ReadUInt16();
header.ShortSectorSizeInPot = reader.ReadUInt16();
header.UnUsed10 = reader.ReadBytes(10);
header.NumberOfSATSectors = reader.ReadInt32();
header.FirstSectorIDofDirectoryStream = reader.ReadInt32();
header.UnUsed4 = reader.ReadBytes(4);
header.MinimumStreamSize = reader.ReadInt32();
header.FirstSectorIDofShortSectorAllocationTable = reader.ReadInt32();
header.NumberOfShortSectors = reader.ReadInt32();
header.FirstSectorIDofMasterSectorAllocationTable = reader.ReadInt32();
header.NumberOfMasterSectors = reader.ReadInt32();
header.MasterSectorAllocationTable = ReadArrayOfInt32(reader, 109);
return header;
}
private static DirectoryEntry ReadDirectoryEntry(BinaryReader reader)
{
DirectoryEntry entry = new DirectoryEntry();
entry.NameBuffer = reader.ReadChars(32);
entry.NameDataSize = reader.ReadUInt16();
entry.EntryType = reader.ReadByte();
entry.NodeColor = reader.ReadByte();
entry.LeftChildDID = reader.ReadInt32();
entry.RightChildDID = reader.ReadInt32();
entry.MembersTreeNodeDID = reader.ReadInt32();
entry.UniqueIdentifier = new Guid(reader.ReadBytes(16));
后面还有 190 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
