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

NameTypeAccessDescription
StreamIduintReadGets or sets the identifier of the stream associated with the entry
NamestringReadGets or sets the name of the directory entry
ObjectTypeDirectoryObjectTypeReadGets or sets the type of the directory object (storage, stream, etc.)
Clsidbyte[]ReadGets or sets the class identifier bytes for the entry
StateBitsuintReadGets or sets the state bits flag for the entry
CreationTimeulongReadGets or sets the creation timestamp of the entry
ModifiedTimeulongReadGets or sets the last modified timestamp of the entry
StreamDatabyte[]Read/WriteGets or sets the raw data bytes of a stream entry
ChildrenList<EntryRecord>ReadGets the list of child entry records under this directory
ColorFlagDirectoryColorFlagRead/WriteGets or sets the red‑black tree color flag for the entry
LeftSiblingIduintRead/WriteGets or sets the identifier of the left sibling entry
RightSiblingIduintRead/WriteGets or sets the identifier of the right sibling entry
ChildIduintRead/WriteGets or sets the identifier of the first child entry
StartingSectorLocationuintRead/WriteGets or sets the first sector index of the stream data
StreamSizeulongRead/WriteGets or sets the size in bytes of the stream
IsRootboolReadIndicates whether the entry is the root storage
IsStorageboolReadIndicates whether the entry represents a storage object
IsStreamboolReadIndicates whether the entry represents a stream object
Payloadbyte[]Read/WriteGets or sets the byte payload associated with the entry
SectorsList<uint>ReadGets the list of sector indices allocated to the entry
FirstSectoruintReadGets or sets the index of the first sector for the entry

Methods

SignatureDescription
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