Class CompoundFile
.Net compound file implementation.
Inheritance
System.Object
CompoundFile
Namespace: Syncfusion.CompoundFile.XlsIO.Net
Assembly: Syncfusion.XlsIO.UWP.dll
Syntax
public class CompoundFile : Object, ICompoundFile, IDisposable
Constructors
CompoundFile()
Default constructor.
Declaration
public CompoundFile()
CompoundFile(Stream)
Default constructor.
Declaration
public CompoundFile(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream |
CompoundFile(String, Boolean)
Declaration
public CompoundFile(string fileName, bool create)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | |
| System.Boolean | create |
Properties
Directory
Declaration
public Directory Directory { get; }
Property Value
| Type |
|---|
| Directory |
Root
Returns root storage.
Declaration
public ICompoundStorage Root { get; }
Property Value
| Type |
|---|
| ICompoundStorage |
RootStorage
Returns root storage object for this file.
Declaration
public ICompoundStorage RootStorage { get; }
Property Value
| Type |
|---|
| ICompoundStorage |
Methods
CheckHeader(Stream)
Checks whether stream header belongs to compound file.
Declaration
public static bool CheckHeader(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Stream to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if stream probably contains compound file data. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Flush()
Declaration
public void Flush()
GetSectorOffset(Int32, UInt16)
Gets offset to the sector.
Declaration
public static long GetSectorOffset(int sectorIndex, ushort sectorShift)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | sectorIndex | Zero-based sector index. |
| System.UInt16 | sectorShift | Sector shift (2^sectorShift = sector size). |
Returns
| Type | Description |
|---|---|
| System.Int64 | Offset to the required sector. |
GetSectorOffset(Int32, UInt16, Int32)
Gets offset to the sector.
Declaration
public static long GetSectorOffset(int sectorIndex, ushort sectorShift, int headerSize)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | sectorIndex | Zero-based sector index. |
| System.UInt16 | sectorShift | Sector shift (2^sectorShift = sector size). |
| System.Int32 | headerSize | Size of the header. |
Returns
| Type | Description |
|---|---|
| System.Int64 | Offset to the required sector. |
Initialize(String, Boolean)
Declaration
public Task Initialize(string fileName, bool create)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | |
| System.Boolean | create |
Returns
| Type |
|---|
| System.Threading.Tasks.Task |
Open(Stream)
Declaration
public void Open(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream |
Save(Stream)
Saves compound file into stream.
Declaration
public void Save(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Stream to save data into. |
Implements
System.IDisposable