432
<member name="M:OpenMcdf.CompoundFile.#ctor(System.String,OpenMcdf.UpdateMode,System.Boolean,System.Boolean,System.Boolean)">
434
Load an existing compound file.
436
<param name="fileName">Compound file to read from</param>
437
<param name="sectorRecycle">If true, recycle unused sectors</param>
438
<param name="updateMode">Select the update mode of the underlying data file</param>
439
<param name="eraseFreeSectors">If true, overwrite with zeros unallocated sectors</param>
440
<param name="noValidationException">If true, no <see cref="T:OpenMcdf.CFCorruptedFileException">CFCorruptedFileException</see>
441
will be thrown even if corrupted file is loaded. Please note that this option is could pose a potential security threat</param>
444
String srcFilename = "data_YOU_CAN_CHANGE.xls";
446
CompoundFile cf = new CompoundFile(srcFilename, UpdateMode.Update, true, true, true);
449
Random r = new Random();
451
byte[] buffer = GetBuffer(r.Next(3, 4095), 0x0A);
453
cf.RootStorage.AddStream("MyStream").SetData(buffer);
455
//This will persist data to the underlying media.
432
462
<member name="M:OpenMcdf.CompoundFile.#ctor(System.IO.Stream,OpenMcdf.UpdateMode,System.Boolean,System.Boolean)">
434
464
Load an existing compound file.
457
487
<exception cref="T:OpenMcdf.CFException">Raised when trying to open a non-seekable stream</exception>
458
488
<exception cref="T:OpenMcdf.CFException">Raised stream is null</exception>
490
<member name="M:OpenMcdf.CompoundFile.#ctor(System.IO.Stream,OpenMcdf.UpdateMode,System.Boolean,System.Boolean,System.Boolean)">
492
Load an existing compound file.
494
<param name="stream">A stream containing a compound file to read</param>
495
<param name="sectorRecycle">If true, recycle unused sectors</param>
496
<param name="updateMode">Select the update mode of the underlying data file</param>
497
<param name="eraseFreeSectors">If true, overwrite with zeros unallocated sectors</param>
498
<param name="noValidationException">If true, openMcdf will try to ignore invalid references or format in order to load a possibly corrupted file anyway </param>
499
<remarks>The 'noValidationEcxception' parameter could possibly lead to security issues so it's recommanded to use it only on trusted sources</remarks>
503
String filename = "reportREAD.xls";
505
FileStream fs = new FileStream(filename, FileMode.Open);
506
CompoundFile cf = new CompoundFile(fs, UpdateMode.ReadOnly, false, false, false, true);
507
CFStream foundStream = cf.RootStorage.GetStream("Workbook");
509
byte[] temp = foundStream.GetData(); //if 'reportRead.xls' is corrupted, openMcdf will try to lad it anyway [noValidationException set true]
511
Assert.IsNotNull(temp);
517
<exception cref="T:OpenMcdf.CFException">Raised when trying to open a non-seekable stream</exception>
518
<exception cref="T:OpenMcdf.CFException">Raised stream is null</exception>
460
520
<member name="M:OpenMcdf.CompoundFile.#ctor(System.IO.Stream)">
462
522
Load an existing compound file from a stream.
680
740
<param name="disposing">If true, method has been called from User code, if false it's been called from .net runtime</param>
742
<member name="M:OpenMcdf.CompoundFile.GetAllNamedEntries(System.String)">
744
Get a list of all entries with a given name contained in the document.
746
<param name="entryName">Name of entries to retrive</param>
747
<returns>A list of name-matching entries</returns>
748
<remarks>This function is aimed to speed up entity lookup in
749
flat-structure files (only one or little more known entries)
750
without the performance penalty related to entities hierarchy constraints.
751
There is no implied hierarchy in the returned list.
682
754
<member name="M:OpenMcdf.CompoundFile.ShrinkCompoundFile(System.IO.Stream)">
684
756
Compress free space by removing unallocated sectors from compound file
1240
1312
the same storage or sub-storage.
1315
<member name="T:OpenMcdf.CFCorruptedFileException">
1317
Raised when trying to load a Compound File with invalid, corrupted or mismatched fields (4.1 - specifications)
1320
This exception is NOT raised when Compound file has been opened with NO_VALIDATION_EXCEPTION option.
1243
1323
<member name="T:BinaryTrees.BinaryTree`1">
1245
1325
Represents a binary tree. This class provides access to the Root of the tree. The developer