NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
ByteReader Class Reference

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. More...

Public Member Functions

 ByteReader (byte[] bytes)
 
 ByteReader (TextAsset asset)
 
string ReadLine ()
 Read a single line from the buffer. More...
 
string ReadLine (bool skipEmptyLines)
 Read a single line from the buffer. More...
 
Dictionary< string, string > ReadDictionary ()
 Assume that the entire file is a collection of key/value pairs. More...
 
BetterList< string > ReadCSV ()
 Read a single line of Comma-Separated Values from the file. More...
 

Static Public Member Functions

static ByteReader Open (string path)
 Read the contents of the specified file and return a Byte Reader to work with. More...
 

Properties

bool canRead [get]
 Whether the buffer is readable. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

ByteReader.ByteReader ( byte[]  bytes)
ByteReader.ByteReader ( TextAsset  asset)

Member Function Documentation

static ByteReader ByteReader.Open ( string  path)
static

Read the contents of the specified file and return a Byte Reader to work with.

BetterList<string> ByteReader.ReadCSV ( )

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

Dictionary<string, string> ByteReader.ReadDictionary ( )

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

string ByteReader.ReadLine ( )

Read a single line from the buffer.

string ByteReader.ReadLine ( bool  skipEmptyLines)

Read a single line from the buffer.

Property Documentation

bool ByteReader.canRead
get

Whether the buffer is readable.


The documentation for this class was generated from the following file: