Difference between revisions of "API:TextReader"
From Kerbal Space Program Wiki
m (N3X15 moved page TextReader to API:TextReader) |
|||
Line 4: | Line 4: | ||
|summary=Identical to System.IO.TextReader, but with added IDisposable methods (for use in using() statements), and a factory method instead of constructors. | |summary=Identical to System.IO.TextReader, but with added IDisposable methods (for use in using() statements), and a factory method instead of constructors. | ||
}} | }} | ||
− | {{ | + | {{PropertiesStart}} |
− | {{ | + | {{Property |
− | | | + | |type=bool |
− | | | + | |name=EndOfStream |
− | |name= | + | |desc= |
− | | | + | |hasget=1 |
+ | |hasset= | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=Stream | ||
+ | |name=BaseStream | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=Encoding | ||
+ | |name=CurrentEncoding | ||
|desc= | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
}} | }} | ||
+ | {{PropertiesEnd}} | ||
+ | {{MethodsStart}} | ||
{{StaticMethod | {{StaticMethod | ||
|returntype=TextReader | |returntype=TextReader | ||
|returndesc= | |returndesc= | ||
|name=CreateForType<T> | |name=CreateForType<T> | ||
− | |args=string filename, Vessel flight = null | + | |args={{arg|string|filename}}, {{arg|Vessel|flight|default=null}} |
− | |desc=Create a | + | |desc=Create a text reader stream. |
}} | }} | ||
{{Method | {{Method | ||
− | |returntype= | + | |returntype=int |
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Read |
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
Line 34: | Line 50: | ||
}} | }} | ||
{{Method | {{Method | ||
− | |returntype= | + | |returntype=void |
+ | |returndesc= | ||
+ | |name=Close | ||
+ | |args= | ||
+ | |desc= | ||
+ | }} | ||
+ | {{Method | ||
+ | |returntype=string | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=ReadLine |
|args= | |args= | ||
|desc= | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
− | |returntype= | + | |returntype=void |
|returndesc= | |returndesc= | ||
− | |name= | + | |name=DiscardBufferedData |
− | |args= | + | |args= |
|desc= | |desc= | ||
}} | }} | ||
Line 50: | Line 73: | ||
|returntype=int | |returntype=int | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Read |
− | |args=char[] | + | |args={{arg|char|buffer|array=[]}}, {{arg|int|index}}, {{arg|int|count}} |
|desc= | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
− | |returntype= | + | |returntype=void |
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Dispose |
|args= | |args= | ||
|desc= | |desc= |
Latest revision as of 22:43, 12 October 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.
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() |