コード例 #1
0
 private void Write(IEnumerable <RarFilePart> parts, Stream writeStream, CancellationToken cancellation)
 {
     using (Stream input = new MultiVolumeStream(parts, listener))
     {
         var pack = new Unpack.Unpack(Entry.FileHeader, input, writeStream);
         pack.doUnpack(Entry.IsSolid, cancellation);
     }
 }
コード例 #2
0
        public void WriteTo(Stream streamToWriteTo, IRarExtractionListener listener)
        {
            if (IsEncrypted)
            {
                throw new RarExtractionException("Entry is password protected and cannot be extracted.");
            }

            if (IsDirectory)
            {
                throw new RarExtractionException("Entry is a file directory and cannot be extracted.");
            }

            listener.CheckNotNull("listener");
            listener.OnFileEntryExtractionInitialized(FilePath, CompressedSize);
            using (Stream input = new MultiVolumeStream(parts, listener))
            {
                var pack = new Unpack.Unpack(FileHeader, input, streamToWriteTo);
                pack.doUnpack(Archive.IsSolidArchive());
            }
        }
コード例 #3
0
        public void WriteTo(Stream streamToWriteTo, IRarExtractionListener listener)
        {
            if (IsEncrypted)
            {
                throw new RarExtractionException("Entry is password protected and cannot be extracted.");
            }

            if (IsDirectory)
            {
                throw new RarExtractionException("Entry is a file directory and cannot be extracted.");
            }

            listener.CheckNotNull("listener");
            listener.OnFileEntryExtractionInitialized(FilePath, CompressedSize);
            using (Stream input = new MultiVolumeStream(parts, listener))
            {
                var pack = new Unpack.Unpack(FileHeader, input, streamToWriteTo);
                pack.doUnpack(Archive.IsSolidArchive());
            }
        }
コード例 #4
0
 private void Write(IEnumerable<RarFilePart> parts, Stream writeStream)
 {
     using (Stream input = new MultiVolumeStream(parts, listener))
     {
         var pack = new Unpack.Unpack(Entry.FileHeader, input, writeStream);
         pack.doUnpack(Entry.IsSolid);
     }
 }