C# Class System.Windows.Forms.DynamicFileByteProvider

Implements a fully editable byte provider for file data of any size.
Only changes to the file are stored in memory with reads from the original data occurring as required.
Inheritance: IByteProvider, IDisposable
Show file Open project: Zepheus/Fiesta_Utils Class Usage Examples

Public Methods

Method Description
ApplyChanges ( ) : void

See IByteProvider.ApplyChanges for more information.

DeleteBytes ( long index, long length ) : void

See IByteProvider.DeleteBytes for more information.

Dispose ( ) : void

See IDisposable.Dispose for more information.

DynamicFileByteProvider ( string fileName ) : System

Constructs a new DynamicFileByteProvider instance.

DynamicFileByteProvider ( string fileName, bool readOnly ) : System

Constructs a new DynamicFileByteProvider instance.

HasChanges ( ) : bool

See IByteProvider.HasChanges for more information.

InsertBytes ( long index, byte bs ) : void

See IByteProvider.InsertBytes for more information.

ReadByte ( long index ) : byte

See IByteProvider.ReadByte for more information.

SupportsDeleteBytes ( ) : bool

See IByteProvider.SupportsDeleteBytes for more information.

SupportsInsertBytes ( ) : bool

See IByteProvider.SupportsInsertBytes for more information.

SupportsWriteByte ( ) : bool

See IByteProvider.SupportsWriteByte for more information.

WriteByte ( long index, byte value ) : void

See IByteProvider.WriteByte for more information.

Private Methods

Method Description
GetDataBlock ( long findOffset, long &blockOffset ) : DataBlock
GetNextFileDataBlock ( DataBlock block, long dataOffset, long &nextDataOffset ) : System.Windows.Forms.FileDataBlock
MoveFileBlock ( System.Windows.Forms.FileDataBlock fileBlock, long dataOffset ) : void
OnChanged ( EventArgs e ) : void
OnLengthChanged ( EventArgs e ) : void
ReInitialize ( ) : void
ReadByteFromFile ( long fileOffset ) : byte

Method Details

ApplyChanges() public method

See IByteProvider.ApplyChanges for more information.
public ApplyChanges ( ) : void
return void

DeleteBytes() public method

See IByteProvider.DeleteBytes for more information.
public DeleteBytes ( long index, long length ) : void
index long
length long
return void

Dispose() public method

See IDisposable.Dispose for more information.
public Dispose ( ) : void
return void

DynamicFileByteProvider() public method

Constructs a new DynamicFileByteProvider instance.
public DynamicFileByteProvider ( string fileName ) : System
fileName string The name of the file from which bytes should be provided.
return System

DynamicFileByteProvider() public method

Constructs a new DynamicFileByteProvider instance.
public DynamicFileByteProvider ( string fileName, bool readOnly ) : System
fileName string The name of the file from which bytes should be provided.
readOnly bool
return System

HasChanges() public method

See IByteProvider.HasChanges for more information.
public HasChanges ( ) : bool
return bool

InsertBytes() public method

See IByteProvider.InsertBytes for more information.
public InsertBytes ( long index, byte bs ) : void
index long
bs byte
return void

ReadByte() public method

See IByteProvider.ReadByte for more information.
public ReadByte ( long index ) : byte
index long
return byte

SupportsDeleteBytes() public method

See IByteProvider.SupportsDeleteBytes for more information.
public SupportsDeleteBytes ( ) : bool
return bool

SupportsInsertBytes() public method

See IByteProvider.SupportsInsertBytes for more information.
public SupportsInsertBytes ( ) : bool
return bool

SupportsWriteByte() public method

See IByteProvider.SupportsWriteByte for more information.
public SupportsWriteByte ( ) : bool
return bool

WriteByte() public method

See IByteProvider.WriteByte for more information.
public WriteByte ( long index, byte value ) : void
index long
value byte
return void