CfbWriter
Overview
CfbWriter is a class in Aspose.Email for NET.
CfbWriter can serialize a CfbDocument to a byte array with ToBytes or write it directly to a file with WriteFile.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
StreamId | uint | Read | Gets or sets the identifier of the stream associated with the entry |
Name | string | Read | Gets or sets the name of the directory entry |
ObjectType | DirectoryObjectType | Read | Gets or sets the type of the directory object (storage, stream, etc.) |
Clsid | byte[] | Read | Gets or sets the class identifier bytes for the entry |
StateBits | uint | Read | Gets or sets the state bits flag for the entry |
CreationTime | ulong | Read | Gets or sets the creation timestamp of the entry |
ModifiedTime | ulong | Read | Gets or sets the last modified timestamp of the entry |
StreamData | byte[] | Read/Write | Gets or sets the raw data bytes of a stream entry |
Children | List<EntryRecord> | Read | Gets the list of child entry records under this directory |
ColorFlag | DirectoryColorFlag | Read/Write | Gets or sets the red‑black tree color flag for the entry |
LeftSiblingId | uint | Read/Write | Gets or sets the identifier of the left sibling entry |
RightSiblingId | uint | Read/Write | Gets or sets the identifier of the right sibling entry |
ChildId | uint | Read/Write | Gets or sets the identifier of the first child entry |
StartingSectorLocation | uint | Read/Write | Gets or sets the first sector index of the stream data |
StreamSize | ulong | Read/Write | Gets or sets the size in bytes of the stream |
IsRoot | bool | Read | Indicates whether the entry is the root storage |
IsStorage | bool | Read | Indicates whether the entry represents a storage object |
IsStream | bool | Read | Indicates whether the entry represents a stream object |
Payload | byte[] | Read/Write | Gets or sets the byte payload associated with the entry |
Sectors | List<uint> | Read | Gets the list of sector indices allocated to the entry |
FirstSector | uint | Read | Gets or sets the index of the first sector for the entry |
Methods
| Signature | Description |
|---|---|
ToBytes(document: CfbDocument) | Converts the given CfbDocument into a byte array representing the CFB file |
WriteFile(document: CfbDocument, path: string) | Writes the supplied CfbDocument to the file system at the specified path |
Serializer(document: CfbDocument) | Creates a serializer instance configured for the provided CfbDocument |
Serialize() | Performs serialization of the writer’s current state into the CFB structure |
EntryRecord(streamId: uint, name: string, objectType: DirectoryObjectType, clsid: byte[], stateBits: uint, creationTime: ulong, modifiedTime: ulong) | Creates a directory entry record with the specified parameters |
Chain(payload: byte[]) | Appends the supplied payload bytes to the current data chain |