public virtual string ReadLine()
{
byte[] stringData = ReadTo(Encoding.GetBytes(NewLine));
if (stringData == null) return null; // ReadTo timed out
if (stringData.Length < 1) return string.Empty; // two consecutive line markers
return new string(Encoding.GetChars(stringData)); // fails when data contains invalid bytes for the current Encoding
// TODO: Fire an error event with raw data.
}