API:TextReader

From Kerbal Space Program Wiki
Jump to: navigation, search

KSP.IO Namespace
BinaryReader · BinaryWriter · File · FileInfo · FileStream · IOException · IOTools · IOUtils · MemoryStream · PluginConfigNode · PluginConfiguration · TextReader · TextWriter

TextReader Class

Identical to System.IO.TextReader, but with added IDisposable methods (for use in using() statements), and a factory method instead of constructors.

Properties

The following are public properties available in TextReader.

Signature Description
bool EndOfStream { get; }
Stream BaseStream { get; }
Encoding CurrentEncoding { get; }

Methods

The following are methods included in TextReader.

Signature Description
static TextReader CreateForType<T>(string filename, Vessel flight = null) Create a text reader stream.
int Read()
int Peek()
void Close()
string ReadLine()
void DiscardBufferedData()
int Read(char[] buffer, int index, int count)
void Dispose()
string ReadToEnd()