Difference between revisions of "API:TextReader"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Namespace:KSP.IO}} {{Class |name=TextReader |summary=Identical to System.IO.TextReader, but with added IDisposable methods (for use in using() statements), and a factory met...")
 
Line 67: Line 67:
 
|args=
 
|args=
 
|desc=
 
|desc=
}}
 
 
}}
 
}}
 
{{MethodsEnd}}
 
{{MethodsEnd}}

Revision as of 03:19, 18 May 2012

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.

Methods

The following are methods included in TextReader.

Signature Description
void Close()
static TextReader CreateForType<T>(string filename, Vessel flight = null) Create a TextReader instance for the desired filename.
void Dispose() Close the TextReader.
int Peek()
int Read()
int Read(char[] buffer, int index, int count)
int ReadBlock(char[] buffer, int index, int count)
string ReadLine()
string ReadToEnd()