C# Class GSF.IO.BinaryStreamPointerBase

An implementation of BinaryStreamBase that is pointer based.
Inheritance: BinaryStreamBase
显示文件 Open project: GridProtectionAlliance/openHistorian

Protected Properties

Property Type Description
Current byte*
First byte*
FirstPosition long
LastPosition long
LastRead byte*
LastWrite byte*

Public Methods

Method Description
Copy ( long source, long destination, int length ) : void

Copies a specified number of bytes to a new location

Flush ( ) : void
GetReadPointer ( long position, int length ) : byte*

Gets a pointer from the current position that can be used for writing up the the provided length. The current position is not advanced after calling this function.

This method will throw an exeption if the provided length cannot be provided.

GetReadPointer ( long position, int length, bool &supportsWriting ) : byte*

Gets a pointer from the current position that can be used for writing up the the provided length. The current position is not advanced after calling this function.

This method will throw an exeption if the provided length cannot be provided.

GetWritePointer ( long position, int length ) : byte*

Gets a pointer from the current position that can be used for writing up the the provided length. The current position is not advanced after calling this function.

This method will throw an exeption if the provided length cannot be provided.

Read ( byte value, int offset, int count ) : int
Read7BitUInt32 ( ) : uint
Read7BitUInt64 ( ) : ulong
ReadInt16 ( ) : short
ReadInt32 ( ) : int
ReadInt64 ( ) : long
ReadUInt8 ( ) : byte
SetLength ( long value ) : void
Write ( byte value ) : void
Write ( byte buffer, int length ) : void
Write ( byte value, int offset, int count ) : void
Write ( int value ) : void
Write ( long value ) : void
Write ( short value ) : void
Write7Bit ( uint value ) : void
Write7Bit ( ulong value ) : void

Protected Methods

Method Description
BinaryStreamPointerBase ( ) : System

Creates a BinaryStreamPointerBase.

Private Methods

Method Description
Read2 ( byte value, int offset, int count ) : int
Write2 ( byte value, int offset, int count ) : void

Method Details

BinaryStreamPointerBase() protected method

Creates a BinaryStreamPointerBase.
protected BinaryStreamPointerBase ( ) : System
return System

Copy() public method

Copies a specified number of bytes to a new location
public Copy ( long source, long destination, int length ) : void
source long
destination long
length int
return void

Flush() public method

public Flush ( ) : void
return void

GetReadPointer() public method

Gets a pointer from the current position that can be used for writing up the the provided length. The current position is not advanced after calling this function.
This method will throw an exeption if the provided length cannot be provided.
public GetReadPointer ( long position, int length ) : byte*
position long
length int the number of bytes valid for the writing.
return byte*

GetReadPointer() public method

Gets a pointer from the current position that can be used for writing up the the provided length. The current position is not advanced after calling this function.
This method will throw an exeption if the provided length cannot be provided.
public GetReadPointer ( long position, int length, bool &supportsWriting ) : byte*
position long
length int the number of bytes valid for the writing.
supportsWriting bool an output parameter detailing if writing to this block is supported.
return byte*

GetWritePointer() public method

Gets a pointer from the current position that can be used for writing up the the provided length. The current position is not advanced after calling this function.
This method will throw an exeption if the provided length cannot be provided.
public GetWritePointer ( long position, int length ) : byte*
position long
length int the number of bytes valid for the writing.
return byte*

Read() public method

public Read ( byte value, int offset, int count ) : int
value byte
offset int
count int
return int

Read7BitUInt32() public method

public Read7BitUInt32 ( ) : uint
return uint

Read7BitUInt64() public method

public Read7BitUInt64 ( ) : ulong
return ulong

ReadInt16() public method

public ReadInt16 ( ) : short
return short

ReadInt32() public method

public ReadInt32 ( ) : int
return int

ReadInt64() public method

public ReadInt64 ( ) : long
return long

ReadUInt8() public method

public ReadUInt8 ( ) : byte
return byte

SetLength() public method

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

Write() public method

public Write ( byte value ) : void
value byte
return void

Write() public method

public Write ( byte buffer, int length ) : void
buffer byte
length int
return void

Write() public method

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

Write() public method

public Write ( int value ) : void
value int
return void

Write() public method

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

Write() public method

public Write ( short value ) : void
value short
return void

Write7Bit() public method

public Write7Bit ( uint value ) : void
value uint
return void

Write7Bit() public method

public Write7Bit ( ulong value ) : void
value ulong
return void

Property Details

Current protected_oe property

the current position data.
protected byte* Current
return byte*

First protected_oe property

the first position of the block
protected byte* First
return byte*

FirstPosition protected_oe property

The position that corresponds to the first byte in the buffer.
protected long FirstPosition
return long

LastPosition protected_oe property

Contains the position for the last position
protected long LastPosition
return long

LastRead protected_oe property

one past the last address for reading
protected byte* LastRead
return byte*

LastWrite protected_oe property

one past the last address for writing
protected byte* LastWrite
return byte*