Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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();
        }