C# Class AK.F1.Timing.Server.IO.ByteBuffer

Provides an append only byte buffer that supports the efficient creation of snapshots. This class cannot be inherited.
Show file Open project: simoneb/ak-f1-timing

Public Methods

Method Description
Append ( byte buffer ) : void

Appends the specified buffer to this buffer.

ByteBuffer ( int initialCapacity ) : System

Initialises new instance of the AK.F1.Timing.Server.IO.ByteBuffer class and specifies the initial buffer capacity.

CreateSnapshot ( ) : ByteBufferSnapshot

Creates a snapshot of this buffer.

Private Methods

Method Description
EnsureCapacity ( int count ) : void
ResizeBuffer ( int newSize ) : void

Method Details

Append() public method

Appends the specified buffer to this buffer.
/// Thrown when this instance has been disposed of. /// /// Thrown when the buffer is unable to be appended. ///
public Append ( byte buffer ) : void
buffer byte The buffer to append.
return void

ByteBuffer() public method

Initialises new instance of the AK.F1.Timing.Server.IO.ByteBuffer class and specifies the initial buffer capacity.
/// Thrown when is not positive. ///
public ByteBuffer ( int initialCapacity ) : System
initialCapacity int The initial buffer cpacity.
return System

CreateSnapshot() public method

Creates a snapshot of this buffer.
public CreateSnapshot ( ) : ByteBufferSnapshot
return ByteBufferSnapshot