C# Class Microsoft.WindowsAzure.Commands.Tools.Vhd.VirtualDiskStream

Provides a logical stream over a virtual hard disk (VHD).
This stream implementation provides a "view" over a VHD, such that the VHD appears to be an ordinary fixed VHD file, regardless of the true physical layout. This stream supports any combination of differencing, dynamic disks, and fixed disks.
Inheritance: SparseStream
ファイルを表示 Open project: Azure/azure-powershell Class Usage Examples

Public Methods

Method Description
Flush ( ) : void
Read ( byte buffer, int offset, int count ) : int

Reads the specified number of bytes from the current position.

Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
TryReadFromFooter ( IndexRange rangeToRead, byte buffer, int offset, int &readCount ) : bool
VirtualDiskStream ( string vhdPath ) : Microsoft.WindowsAzure.Commands.Tools.Vhd.Model
Write ( byte buffer, int offset, int count ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
ByteToBlock ( long position ) : uint
GenerateFooter ( ) : byte[]

Method Details

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Flush() public method

public Flush ( ) : void
return void

Read() public method

Reads the specified number of bytes from the current position.
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

TryReadFromFooter() public method

public TryReadFromFooter ( IndexRange rangeToRead, byte buffer, int offset, int &readCount ) : bool
rangeToRead IndexRange
buffer byte
offset int
readCount int
return bool

VirtualDiskStream() public method

public VirtualDiskStream ( string vhdPath ) : Microsoft.WindowsAzure.Commands.Tools.Vhd.Model
vhdPath string
return Microsoft.WindowsAzure.Commands.Tools.Vhd.Model

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void