C# Class System.StreamExtensions

Afficher le fichier Open project: GoodAI/BrainSimulator

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
CheckGZipHeader ( this stream ) : bool
Read7BitEncodedInt ( this stream ) : int
ReadByteNoAlloc ( this stream ) : byte
ReadDecimal ( this stream ) : decimal
ReadDouble ( this stream ) : double
ReadFloat ( this stream ) : float
ReadInt16 ( this stream ) : Int16
ReadInt32 ( this stream ) : Int32
ReadInt64 ( this stream ) : System.Int64
ReadNoAlloc ( this stream, byte bytes, int offset, int count ) : void
ReadString ( this stream, Encoding encoding = null ) : string
ReadUInt16 ( this stream ) : UInt16
ReadUInt32 ( this stream ) : UInt32
ReadUInt64 ( this stream ) : System.UInt64
SkipBytes ( this stream, int byteCount ) : void
UnwrapGZip ( this stream ) : Stream

Checks for GZip header and if found, returns decompressed Stream, otherwise original Stream

WrapGZip ( this stream, bool buffered = true ) : Stream

Wraps stream into GZip compression stream resulting in writing compressed stream

Write7BitEncodedInt ( this stream, int value ) : void
WriteNoAlloc ( this stream, Int16 v ) : void
WriteNoAlloc ( this stream, Int32 v ) : void
WriteNoAlloc ( this stream, System.Int64 v ) : void
WriteNoAlloc ( this stream, UInt16 v ) : void
WriteNoAlloc ( this stream, UInt32 v ) : void
WriteNoAlloc ( this stream, System.UInt64 v ) : void
WriteNoAlloc ( this stream, byte value ) : void
WriteNoAlloc ( this stream, byte bytes, int offset, int count ) : void
WriteNoAlloc ( this stream, decimal v ) : void
WriteNoAlloc ( this stream, double v ) : void
WriteNoAlloc ( this stream, float v ) : void
WriteNoAlloc ( this stream, string text, Encoding encoding = null ) : void

Writes byte count prefixed encoded text into the file. Byte count is written as 7-bit encoded 32-bit int. If no encoding is specified, UTF-8 will be used. Byte count prefix specifies number of bytes taken up by the string, not length of the string itself. Note that this method may allocate if the size of encoded string exceeds size of prepared buffer.

Method Details

CheckGZipHeader() public static méthode

public static CheckGZipHeader ( this stream ) : bool
stream this
Résultat bool

Read7BitEncodedInt() public static méthode

public static Read7BitEncodedInt ( this stream ) : int
stream this
Résultat int

ReadByteNoAlloc() public static méthode

public static ReadByteNoAlloc ( this stream ) : byte
stream this
Résultat byte

ReadDecimal() public static méthode

public static ReadDecimal ( this stream ) : decimal
stream this
Résultat decimal

ReadDouble() public static méthode

public static ReadDouble ( this stream ) : double
stream this
Résultat double

ReadFloat() public static méthode

public static ReadFloat ( this stream ) : float
stream this
Résultat float

ReadInt16() public static méthode

public static ReadInt16 ( this stream ) : Int16
stream this
Résultat Int16

ReadInt32() public static méthode

public static ReadInt32 ( this stream ) : Int32
stream this
Résultat Int32

ReadInt64() public static méthode

public static ReadInt64 ( this stream ) : System.Int64
stream this
Résultat System.Int64

ReadNoAlloc() public static méthode

public static ReadNoAlloc ( this stream, byte bytes, int offset, int count ) : void
stream this
bytes byte
offset int
count int
Résultat void

ReadString() public static méthode

public static ReadString ( this stream, Encoding encoding = null ) : string
stream this
encoding Encoding
Résultat string

ReadUInt16() public static méthode

public static ReadUInt16 ( this stream ) : UInt16
stream this
Résultat UInt16

ReadUInt32() public static méthode

public static ReadUInt32 ( this stream ) : UInt32
stream this
Résultat UInt32

ReadUInt64() public static méthode

public static ReadUInt64 ( this stream ) : System.UInt64
stream this
Résultat System.UInt64

SkipBytes() public static méthode

public static SkipBytes ( this stream, int byteCount ) : void
stream this
byteCount int
Résultat void

UnwrapGZip() public static méthode

Checks for GZip header and if found, returns decompressed Stream, otherwise original Stream
public static UnwrapGZip ( this stream ) : Stream
stream this
Résultat Stream

WrapGZip() public static méthode

Wraps stream into GZip compression stream resulting in writing compressed stream
public static WrapGZip ( this stream, bool buffered = true ) : Stream
stream this
buffered bool
Résultat Stream

Write7BitEncodedInt() public static méthode

public static Write7BitEncodedInt ( this stream, int value ) : void
stream this
value int
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, Int16 v ) : void
stream this
v Int16
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, Int32 v ) : void
stream this
v Int32
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, System.Int64 v ) : void
stream this
v System.Int64
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, UInt16 v ) : void
stream this
v UInt16
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, UInt32 v ) : void
stream this
v UInt32
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, System.UInt64 v ) : void
stream this
v System.UInt64
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, byte value ) : void
stream this
value byte
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, byte bytes, int offset, int count ) : void
stream this
bytes byte
offset int
count int
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, decimal v ) : void
stream this
v decimal
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, double v ) : void
stream this
v double
Résultat void

WriteNoAlloc() public static méthode

public static WriteNoAlloc ( this stream, float v ) : void
stream this
v float
Résultat void

WriteNoAlloc() public static méthode

Writes byte count prefixed encoded text into the file. Byte count is written as 7-bit encoded 32-bit int. If no encoding is specified, UTF-8 will be used. Byte count prefix specifies number of bytes taken up by the string, not length of the string itself. Note that this method may allocate if the size of encoded string exceeds size of prepared buffer.
public static WriteNoAlloc ( this stream, string text, Encoding encoding = null ) : void
stream this
text string
encoding Encoding
Résultat void