C# Class CK.Core.CKBinaryReader

Specializes BinaryReader to expose helpers.
Inheritance: System.IO.BinaryReader
Datei anzeigen Open project: Invenietis/ck-core Class Usage Examples

Public Methods

Method Description
CKBinaryReader ( Stream input ) : CK.Text

Initializes a new CKBinaryReader based on the specified stream and using UTF-8 encoding.

CKBinaryReader ( Stream input, Encoding encoding ) : CK.Text

Initializes a new CKBinaryReader based on the specified stream and character encoding.

CKBinaryReader ( Stream input, Encoding encoding, bool leaveOpen ) : CK.Text

Initializes a new CKBinaryReader based on the specified stream and character encoding.

ReadNonNegativeSmallInt32 ( ) : int

Reads in a 32-bit integer in compressed format.

ReadNullableString ( ) : string

Reads a potentially null string.

ReadNullableString ( bool streamIsCRLF ) : string

Reads a potentially null string.

ReadSmallInt32 ( int minNegativeValue = -1 ) : int

Reads in a 32-bit integer in compressed format wriiten by CKBinaryWriter.WriteSmallInt32(int, int).

ReadString ( bool streamIsCRLF ) : string

Reads and normalizes a string according to Environment.NewLine. The fact that the data has actually be saved with LF or CRLF must be known.

Method Details

CKBinaryReader() public method

Initializes a new CKBinaryReader based on the specified stream and using UTF-8 encoding.
public CKBinaryReader ( Stream input ) : CK.Text
input Stream The input stream.
return CK.Text

CKBinaryReader() public method

Initializes a new CKBinaryReader based on the specified stream and character encoding.
public CKBinaryReader ( Stream input, Encoding encoding ) : CK.Text
input Stream The input stream.
encoding System.Text.Encoding The character encoding to use.
return CK.Text

CKBinaryReader() public method

Initializes a new CKBinaryReader based on the specified stream and character encoding.
public CKBinaryReader ( Stream input, Encoding encoding, bool leaveOpen ) : CK.Text
input Stream The input stream.
encoding System.Text.Encoding The character encoding to use.
leaveOpen bool true to leave the stream open after this reader object is disposed; otherwise, false.
return CK.Text

ReadNonNegativeSmallInt32() public method

Reads in a 32-bit integer in compressed format.
public ReadNonNegativeSmallInt32 ( ) : int
return int

ReadNullableString() public method

Reads a potentially null string.
public ReadNullableString ( ) : string
return string

ReadNullableString() public method

Reads a potentially null string.
public ReadNullableString ( bool streamIsCRLF ) : string
streamIsCRLF bool True if the contains /// strings with CRLF end-of-line, false if the end-of-line is LF only.
return string

ReadSmallInt32() public method

Reads in a 32-bit integer in compressed format wriiten by CKBinaryWriter.WriteSmallInt32(int, int).
public ReadSmallInt32 ( int minNegativeValue = -1 ) : int
minNegativeValue int The same negative value used to write the integer.
return int

ReadString() public method

Reads and normalizes a string according to Environment.NewLine. The fact that the data has actually be saved with LF or CRLF must be known.
public ReadString ( bool streamIsCRLF ) : string
streamIsCRLF bool True if the contains /// strings with CRLF end-of-line, false if the end-of-line is LF only.
return string