C# 클래스 System.StreamExtensions

파일 보기 프로젝트 열기: GoodAI/BrainSimulator

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
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.

메소드 상세

CheckGZipHeader() 공개 정적인 메소드

public static CheckGZipHeader ( this stream ) : bool
stream this
리턴 bool

Read7BitEncodedInt() 공개 정적인 메소드

public static Read7BitEncodedInt ( this stream ) : int
stream this
리턴 int

ReadByteNoAlloc() 공개 정적인 메소드

public static ReadByteNoAlloc ( this stream ) : byte
stream this
리턴 byte

ReadDecimal() 공개 정적인 메소드

public static ReadDecimal ( this stream ) : decimal
stream this
리턴 decimal

ReadDouble() 공개 정적인 메소드

public static ReadDouble ( this stream ) : double
stream this
리턴 double

ReadFloat() 공개 정적인 메소드

public static ReadFloat ( this stream ) : float
stream this
리턴 float

ReadInt16() 공개 정적인 메소드

public static ReadInt16 ( this stream ) : Int16
stream this
리턴 Int16

ReadInt32() 공개 정적인 메소드

public static ReadInt32 ( this stream ) : Int32
stream this
리턴 Int32

ReadInt64() 공개 정적인 메소드

public static ReadInt64 ( this stream ) : System.Int64
stream this
리턴 System.Int64

ReadNoAlloc() 공개 정적인 메소드

public static ReadNoAlloc ( this stream, byte bytes, int offset, int count ) : void
stream this
bytes byte
offset int
count int
리턴 void

ReadString() 공개 정적인 메소드

public static ReadString ( this stream, Encoding encoding = null ) : string
stream this
encoding Encoding
리턴 string

ReadUInt16() 공개 정적인 메소드

public static ReadUInt16 ( this stream ) : UInt16
stream this
리턴 UInt16

ReadUInt32() 공개 정적인 메소드

public static ReadUInt32 ( this stream ) : UInt32
stream this
리턴 UInt32

ReadUInt64() 공개 정적인 메소드

public static ReadUInt64 ( this stream ) : System.UInt64
stream this
리턴 System.UInt64

SkipBytes() 공개 정적인 메소드

public static SkipBytes ( this stream, int byteCount ) : void
stream this
byteCount int
리턴 void

UnwrapGZip() 공개 정적인 메소드

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

WrapGZip() 공개 정적인 메소드

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

Write7BitEncodedInt() 공개 정적인 메소드

public static Write7BitEncodedInt ( this stream, int value ) : void
stream this
value int
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, Int16 v ) : void
stream this
v Int16
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, Int32 v ) : void
stream this
v Int32
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, System.Int64 v ) : void
stream this
v System.Int64
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, UInt16 v ) : void
stream this
v UInt16
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, UInt32 v ) : void
stream this
v UInt32
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, System.UInt64 v ) : void
stream this
v System.UInt64
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, byte value ) : void
stream this
value byte
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, byte bytes, int offset, int count ) : void
stream this
bytes byte
offset int
count int
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, decimal v ) : void
stream this
v decimal
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, double v ) : void
stream this
v double
리턴 void

WriteNoAlloc() 공개 정적인 메소드

public static WriteNoAlloc ( this stream, float v ) : void
stream this
v float
리턴 void

WriteNoAlloc() 공개 정적인 메소드

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
리턴 void