C# Class Volante.StreamFile

IFile implementation which to store databases on System.IO.Stream instances.
Inheritance: IFile
Mostra file Open project: kjk/volante

Public Methods

Method Description
Close ( ) : void

Closes the stream (subject to the NoFlush property)

Lock ( ) : void

Locks the stream (no-op)

Read ( long pos, byte buf ) : int

Read method

StreamFile ( System stream )

Construction

StreamFile ( System stream, long offset )

Construction

Sync ( ) : void

Flushes the stream (subject to the NoFlush property)

Write ( long pos, byte buf ) : void

Write method

Method Details

Close() public method

Closes the stream (subject to the NoFlush property)
public Close ( ) : void
return void

Lock() public method

Locks the stream (no-op)
public Lock ( ) : void
return void

Read() public method

Read method
public Read ( long pos, byte buf ) : int
pos long Zero-based position
buf byte Buffer where to store buf.Length byte(s) read from the stream
return int

StreamFile() public method

Construction
public StreamFile ( System stream )
stream System A where to store the database

StreamFile() public method

Construction
public StreamFile ( System stream, long offset )
stream System A where to store the database
offset long Offset within the stream where to store/find the database

Sync() public method

Flushes the stream (subject to the NoFlush property)
public Sync ( ) : void
return void

Write() public method

Write method
public Write ( long pos, byte buf ) : void
pos long Zero-based position
buf byte Buffer to write to the stream. The entire buffer is written
return void