Difference between revisions of "API:BinaryWriter"
From Kerbal Space Program Wiki
m (N3X15 moved page BinaryWriter to API:BinaryWriter) |
|||
Line 9: | Line 9: | ||
|returndesc= | |returndesc= | ||
|name=CreateForType<T> | |name=CreateForType<T> | ||
− | |args=string filename, Vessel flight = null | + | |args={{arg|string|filename}}, {{arg|Vessel|flight|default = null}} |
|desc=Factory method for creating a BinaryWriter for the desired filename. | |desc=Factory method for creating a BinaryWriter for the desired filename. | ||
}} | }} |
Revision as of 20:30, 12 October 2012
KSP.IO Namespace
BinaryReader ·
BinaryWriter ·
File ·
FileInfo ·
FileStream ·
IOException ·
IOTools ·
IOUtils ·
MemoryStream ·
PluginConfigNode ·
PluginConfiguration ·
TextReader ·
TextWriter
BinaryWriter Class
Identical to System.IO.BinaryWriter, but with added IDisposable methods (for use in using structures), and a factory method instead of constructors.
Methods
The following are methods included in BinaryWriter.
Signature | Description |
---|---|
static BinaryWriter CreateForType<T>(string filename, Vessel flight = null) | Factory method for creating a BinaryWriter for the desired filename. |
void Write(string value) | |
void Write(ulong value) | |
void Write(char ch) | |
void Close() | |
void Write(byte[] buffer) | |
void Write(char[] chars) | |
void Write(ushort value) | |
void Write(sbyte value) | |
void Write(byte value) | |
void Write(bool value) | |
void Flush() | |
void Write(short value) | |
void Write(double value) | |
void Write(decimal value) | |
void Write(float value) | |
void Write(uint value) | |
void Write(int value) | |
void Write(char[] chars, int index, int count) | |
void Write(byte[] buffer, int index, int count) | |
long Seek(int offset, KSP.IO.SeekOrigin origin) | |
void Dispose() | |
void Write(long value) |