C# Class ByteReader, TheUnseen

MemoryStream.ReadLine has an interesting oddity: it doesn't always advance the stream's position by the correct amount: http://social.msdn.microsoft.com/Forums/en-AU/Vsexpressvcs/thread/b8f7837b-e396-494e-88e1-30547fcf385f Solution? Custom line reader with the added benefit of not having to use streams at all.
Mostra file Open project: henryj41043/TheUnseen Class Usage Examples

Public Methods

Method Description
ByteReader ( TextAsset asset ) : UnityEngine
ByteReader ( byte bytes ) : UnityEngine
ReadCSV ( ) : BetterList

Read a single line of Comma-Separated Values from the file.

ReadDictionary ( ) : string>.Dictionary

Assume that the entire file is a collection of key/value pairs.

ReadLine ( ) : string

Read a single line from the buffer.

Private Methods

Method Description
ReadLine ( byte buffer, int start, int count ) : string

Read a single line from the buffer.

Method Details

ByteReader() public method

public ByteReader ( TextAsset asset ) : UnityEngine
asset UnityEngine.TextAsset
return UnityEngine

ByteReader() public method

public ByteReader ( byte bytes ) : UnityEngine
bytes byte
return UnityEngine

ReadCSV() public method

Read a single line of Comma-Separated Values from the file.
public ReadCSV ( ) : BetterList
return BetterList

ReadDictionary() public method

Assume that the entire file is a collection of key/value pairs.
public ReadDictionary ( ) : string>.Dictionary
return string>.Dictionary

ReadLine() public method

Read a single line from the buffer.
public ReadLine ( ) : string
return string