C# Class CqlSharp.Protocol.StreamExtensions

Extensions to the Stream class to read and write primitive values as used in the Binary Protocol
Afficher le fichier Open project: reuzel/CqlSharp

Méthodes publiques

Méthode Description
ReadByteArray ( this stream ) : byte[]

Reads a byte array.

ReadInet ( this stream ) : IPEndPoint

Reads an IP-Address and port

ReadInt ( this stream ) : int

Reads an int.

ReadShort ( this stream ) : ushort

Reads a short.

ReadShortByteArray ( this stream ) : byte[]

Reads a short byte array.

ReadString ( this stream ) : string

Reads a string.

ReadStringList ( this stream ) : string[]

Reads a list of strings

ReadStringMultimap ( this stream ) : string[]>.Dictionary

Reads a string multimap.

ReadUuid ( this stream ) : System.Guid

Reads a UUID/GUID.

WriteByteArray ( this stream, byte data ) : void

Writes a byte array.

WriteConsistency ( this stream, CqlConsistency consistency ) : void

Writes the consistency.

WriteInet ( this stream, IPEndPoint endpoint ) : void

Writes an IP address and port

WriteInt ( this stream, int data ) : void

Writes an int.

WriteLong ( this stream, long data ) : void

Writes an long.

WriteLongString ( this stream, string data ) : void

Writes a long string.

WriteShort ( this stream, ushort data ) : void

Writes a short.

WriteShortByteArray ( this stream, byte data ) : void

Writes a short byte array.

WriteString ( this stream, string data ) : void

Writes a string.

WriteStringList ( this stream, IList data ) : void

Writes a list of strings.

WriteStringMap ( this stream, string>.IDictionary dic ) : void

Writes a string map.

WriteUuid ( this stream, System.Guid guid ) : void

Writes a UUID/GUID.

Private Methods

Méthode Description
ReadBuffer ( this stream, byte buffer ) : void

Reads the buffer.

ReadBuffer ( this stream, byte buffer, int len ) : void

Reads the buffer up to a specified length

Method Details

ReadByteArray() public static méthode

Reads a byte array.
public static ReadByteArray ( this stream ) : byte[]
stream this The stream.
Résultat byte[]

ReadInet() public static méthode

Reads an IP-Address and port
Unexpected end of stream
public static ReadInet ( this stream ) : IPEndPoint
stream this The stream.
Résultat System.Net.IPEndPoint

ReadInt() public static méthode

Reads an int.
Unexpected end of stream reached
public static ReadInt ( this stream ) : int
stream this The stream.
Résultat int

ReadShort() public static méthode

Reads a short.
Unexpected end of stream reached
public static ReadShort ( this stream ) : ushort
stream this The stream.
Résultat ushort

ReadShortByteArray() public static méthode

Reads a short byte array.
public static ReadShortByteArray ( this stream ) : byte[]
stream this The stream.
Résultat byte[]

ReadString() public static méthode

Reads a string.
public static ReadString ( this stream ) : string
stream this The stream.
Résultat string

ReadStringList() public static méthode

Reads a list of strings
public static ReadStringList ( this stream ) : string[]
stream this The stream.
Résultat string[]

ReadStringMultimap() public static méthode

Reads a string multimap.
public static ReadStringMultimap ( this stream ) : string[]>.Dictionary
stream this The stream.
Résultat string[]>.Dictionary

ReadUuid() public static méthode

Reads a UUID/GUID.
public static ReadUuid ( this stream ) : System.Guid
stream this The stream.
Résultat System.Guid

WriteByteArray() public static méthode

Writes a byte array.
public static WriteByteArray ( this stream, byte data ) : void
stream this The stream.
data byte The data.
Résultat void

WriteConsistency() public static méthode

Writes the consistency.
public static WriteConsistency ( this stream, CqlConsistency consistency ) : void
stream this The stream.
consistency CqlConsistency The consistency.
Résultat void

WriteInet() public static méthode

Writes an IP address and port
public static WriteInet ( this stream, IPEndPoint endpoint ) : void
stream this The stream.
endpoint System.Net.IPEndPoint The endpoint.
Résultat void

WriteInt() public static méthode

Writes an int.
public static WriteInt ( this stream, int data ) : void
stream this The stream.
data int The data.
Résultat void

WriteLong() public static méthode

Writes an long.
public static WriteLong ( this stream, long data ) : void
stream this The stream.
data long The data.
Résultat void

WriteLongString() public static méthode

Writes a long string.
public static WriteLongString ( this stream, string data ) : void
stream this The stream.
data string The data.
Résultat void

WriteShort() public static méthode

Writes a short.
public static WriteShort ( this stream, ushort data ) : void
stream this The stream.
data ushort The data.
Résultat void

WriteShortByteArray() public static méthode

Writes a short byte array.
public static WriteShortByteArray ( this stream, byte data ) : void
stream this The stream.
data byte The data.
Résultat void

WriteString() public static méthode

Writes a string.
public static WriteString ( this stream, string data ) : void
stream this The stream.
data string The data.
Résultat void

WriteStringList() public static méthode

Writes a list of strings.
public static WriteStringList ( this stream, IList data ) : void
stream this The stream.
data IList The data.
Résultat void

WriteStringMap() public static méthode

Writes a string map.
public static WriteStringMap ( this stream, string>.IDictionary dic ) : void
stream this The stream.
dic string>.IDictionary The dic.
Résultat void

WriteUuid() public static méthode

Writes a UUID/GUID.
public static WriteUuid ( this stream, System.Guid guid ) : void
stream this The stream.
guid System.Guid The GUID.
Résultat void