コード例 #1
0
 /// <summary>
 /// Creates a new instance from a stream.
 /// </summary>
 /// <param name="fileStream">The stream containing the .XVA file</param>
 /// <param name="ownership">Whether to transfer ownership of <c>fileStream</c> to the new instance.</param>
 public VirtualMachine(Stream fileStream, Ownership ownership)
 {
     _fileStream = fileStream;
     _ownership = ownership;
     _fileStream.Position = 0;
     _archive = new TarFile(fileStream);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the VirtualMachine class.
 /// </summary>
 /// <param name="fileStream">The stream containing the .XVA file.</param>
 /// <param name="ownership">Whether to transfer ownership of <c>fileStream</c> to the new instance.</param>
 public VirtualMachine(Stream fileStream, Ownership ownership)
 {
     _fileStream          = fileStream;
     _ownership           = ownership;
     _fileStream.Position = 0;
     Archive = new TarFile(fileStream);
 }
コード例 #3
0
ファイル: DiskStream.cs プロジェクト: Lukas0610/ndiscutils
        public DiskStream(TarFile archive, long length, string dir)
        {
            _archive = archive;
            _length  = length;
            _dir     = dir;

            if (!archive.DirExists(_dir))
            {
                throw new IOException("No such disk");
            }

            ReadChunkSkipList();
        }
コード例 #4
0
ファイル: DiskStream.cs プロジェクト: git-thinh/MediaPortal-2
        public DiskStream(TarFile archive, long length, string dir)
        {
            _archive = archive;
            _length  = length;
            _dir     = dir;

            if (!archive.DirExists(_dir))
            {
                throw new IOException("No such disk");
            }

            int numChunks = (int)((length + Sizes.OneMiB - 1) / Sizes.OneMiB);
        }
コード例 #5
0
ファイル: DiskStream.cs プロジェクト: joconno4/MediaPortal-2
        public DiskStream(TarFile archive, long length, string dir)
        {
            _archive = archive;
            _length = length;
            _dir = dir;

            if (!archive.DirExists(_dir))
            {
                throw new IOException("No such disk");
            }

            int numChunks = (int)((length + Sizes.OneMiB - 1) / Sizes.OneMiB);
        }
コード例 #6
0
ファイル: DiskStream.cs プロジェクト: JGTM2016/discutils
        public DiskStream(TarFile archive, long length, string dir)
        {
            _archive = archive;
            _length = length;
            _dir = dir;

            if (!archive.DirExists(_dir))
            {
                throw new IOException("No such disk");
            }

            ReadChunkSkipList();
        }