Difference between revisions of "API:BinaryReader"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Namespace:KSP.IO}} {{Class |name=BinaryReader |summary=Identical to System.IO.BinaryReader, but with added IDisposable methods (for use in using structures), and a factory m...")
 
Line 5: Line 5:
 
}}
 
}}
 
{{MethodsStart}}
 
{{MethodsStart}}
{{Method
+
{{StaticMethod
 
|returntype=BinaryReader
 
|returntype=BinaryReader
 
|returndesc=The binary reader requested
 
|returndesc=The binary reader requested

Revision as of 23:28, 17 May 2012

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

BinaryReader Class

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

Methods

The following are methods included in BinaryReader.

Signature Description
static BinaryReader CreateForType<T>(string filename, Vessel flight = null) Create a binary reader with the desired filename.
void Close() ?
void Dispose() ?
int PeekChar() ?
int Read() ?
int Read(byte[] buffer, int index, int count) ?
int Read(char[] buffer, int index, int count) ?
bool ReadBoolean() ?
byte ReadByte() ?
byte[] ReadBytes(int count) ?
char ReadChar() ?
char[] ReadChars(int count) ?
decimal ReadDecimal() ?
double ReadDouble() ?
short ReadInt16() ?
int ReadInt32() ?
long ReadInt64() ?
sbyte ReadSByte() ?
float ReadSingle() ?
string ReadString() ?
ushort ReadUInt16() ?
uint ReadUInt32() ?
ulong ReadUInt64() ?