C# Class DBreeze.Storage.MemoryStorage

Memory storage
Inheritance: IDisposable
Afficher le fichier Open project: hhblaze/DBreeze Class Usage Examples

Méthodes publiques

Méthode Description
Clear ( bool withInternalArrayResize ) : void

Sets EOF pointer to 0.

USE withInternalArrayResize by necessity. If it's true then array will be re-initialized to initial capacity

this also will call GC and the whole process will take some time.

If false, only pointer EOF will be set to 0, capacity of the array will not be changed - very fast

Dispose ( ) : void
GetFullData ( ) : byte[]

Can return null

MemoryStorage ( int initialCapacity, int increaseOnBytes, eMemoryExpandStartegy strategy ) : System

Read ( int offset, int length ) : byte[]

If length = 0 returns new byte[0]

Write_ByOffset ( int offset, byte &data ) : void

Write_ToTheEnd ( byte &data ) : int

Writes_ByOffsets ( byte[]>.Dictionary datas ) : void

Private Methods

Méthode Description
Resize ( int upTo ) : void
Write ( byte data, int offset ) : void

Method Details

Clear() public méthode

Sets EOF pointer to 0.

USE withInternalArrayResize by necessity. If it's true then array will be re-initialized to initial capacity

this also will call GC and the whole process will take some time.

If false, only pointer EOF will be set to 0, capacity of the array will not be changed - very fast

public Clear ( bool withInternalArrayResize ) : void
withInternalArrayResize bool
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetFullData() public méthode

Can return null
public GetFullData ( ) : byte[]
Résultat byte[]

MemoryStorage() public méthode

public MemoryStorage ( int initialCapacity, int increaseOnBytes, eMemoryExpandStartegy strategy ) : System
initialCapacity int Initial Memory Capacity in bytes
increaseOnBytes int Rules is strategy is FIXED_LENGTH_INCREASE, quantity of bytes to increse memory
strategy eMemoryExpandStartegy Memory expand strategy
Résultat System

Read() public méthode

If length = 0 returns new byte[0]
public Read ( int offset, int length ) : byte[]
offset int
length int
Résultat byte[]

Write_ByOffset() public méthode

public Write_ByOffset ( int offset, byte &data ) : void
offset int
data byte
Résultat void

Write_ToTheEnd() public méthode

public Write_ToTheEnd ( byte &data ) : int
data byte
Résultat int

Writes_ByOffsets() public méthode

public Writes_ByOffsets ( byte[]>.Dictionary datas ) : void
datas byte[]>.Dictionary
Résultat void