Class CompoundFile
.Net compound file implementation.
Inheritance
Inherited Members
Namespace: Syncfusion.CompoundFile.XlsIO.Net
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class CompoundFile : 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)
Default constructor.
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
[CLSCompliant(false)]
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
[CLSCompliant(false)]
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.  | 
      
Main()
Declaration
public static void Main()
  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.  | 
      
Save(String)
Saves compound file into file.
Declaration
public void Save(string fileName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | fileName | Name of the file to save into.  |