示例#1
0
 internal Ole2Stream(string name, int size, int readSID, ReadData readData) : base(name)
 {
     this.ReadSID             = -1;
     this.WriteSID            = -1;
     this.size                = size;
     this.ReadSID             = readSID;
     this.getStreamDataMethod = new GetStreamDataHandler(readData.GetStreamData);
 }
示例#2
0
 public void Dispose()
 {
     if (this.readData != null)
     {
         if (this.readData.closeInputStream)
         {
             this.readData.inputStream.Close();
         }
         this.readData = null;
     }
 }
示例#3
0
        public void Load(Stream stream, bool loadOnDemand)
        {
            if (stream == null)
            {
                throw new CompoundFileException("Stream argument can't be null.");
            }
            if (stream.Length < 0x200L)
            {
                throw new CompoundFileException("Reading error: file is not a valid OLE2 Compound File.");
            }
            this.Dispose();
            ReadData data = new ReadData(this, stream);

            if (loadOnDemand)
            {
                this.readData = data;
            }
            else
            {
                this.Root.CacheAllStreams();
            }
        }