KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions | Properties | List of all members
KSP.IO.BinaryReader Class Reference

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

Inheritance diagram for KSP.IO.BinaryReader:

Public Member Functions

void Close ()
 
void Dispose ()
 Close the stream and any resources (e.g. files) it has open. More...
 
int PeekChar ()
 
int Read ()
 
int Read (byte[] buffer, int index, int count)
 Read a block of bytes from the stream. More...
 
int Read (char[] buffer, int index, int count)
 Read a block of chars from the stream. More...
 
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 ()
 

Static Public Member Functions

static BinaryReader CreateForType< T > (string filename, Vessel flight=null)
 Create a binary reader with the desired filename. More...
 

Properties

Stream BaseStream [get]
 

Detailed Description

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

Member Function Documentation

void KSP.IO.BinaryReader.Close ( )
static BinaryReader KSP.IO.BinaryReader.CreateForType< T > ( string  filename,
Vessel  flight = null 
)
static

Create a binary reader with the desired filename.

Template Parameters
T
Parameters
filename
flight
Returns
void KSP.IO.BinaryReader.Dispose ( )

Close the stream and any resources (e.g. files) it has open.

int KSP.IO.BinaryReader.PeekChar ( )
int KSP.IO.BinaryReader.Read ( )
int KSP.IO.BinaryReader.Read ( byte[]  buffer,
int  index,
int  count 
)

Read a block of bytes from the stream.

Parameters
buffer
index
count
Returns
int KSP.IO.BinaryReader.Read ( char[]  buffer,
int  index,
int  count 
)

Read a block of chars from the stream.

Parameters
buffer
index
count
Returns
bool KSP.IO.BinaryReader.ReadBoolean ( )
byte KSP.IO.BinaryReader.ReadByte ( )
byte [] KSP.IO.BinaryReader.ReadBytes ( int  count)
char KSP.IO.BinaryReader.ReadChar ( )
char [] KSP.IO.BinaryReader.ReadChars ( int  count)
decimal KSP.IO.BinaryReader.ReadDecimal ( )
double KSP.IO.BinaryReader.ReadDouble ( )
short KSP.IO.BinaryReader.ReadInt16 ( )
int KSP.IO.BinaryReader.ReadInt32 ( )
long KSP.IO.BinaryReader.ReadInt64 ( )
sbyte KSP.IO.BinaryReader.ReadSByte ( )
float KSP.IO.BinaryReader.ReadSingle ( )
string KSP.IO.BinaryReader.ReadString ( )
ushort KSP.IO.BinaryReader.ReadUInt16 ( )
uint KSP.IO.BinaryReader.ReadUInt32 ( )
ulong KSP.IO.BinaryReader.ReadUInt64 ( )

Property Documentation

Stream KSP.IO.BinaryReader.BaseStream
get

The documentation for this class was generated from the following file: