Difference between revisions of "API:IOTools"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Namespace:KSP.IO}} {{Class |name=IOTools |summary=Provide some common IO tools that are needed by plugins. }} {{MethodsStart}} {{StaticMethod |returntype=object |returndesc=...")
 
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
 
|returndesc=
 
|returndesc=
 
|name=DeserializeFromBinary
 
|name=DeserializeFromBinary
|args=byte[] input
+
|args={{arg|byte|input|array=[]}}
|desc=Deserialize an object from binary.
+
|desc=Deserialize a binary serialized object
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
|returntype=byte[]
+
|returntype=byte
 +
|array=[]
 
|returndesc=
 
|returndesc=
 
|name=SerializeToBinary
 
|name=SerializeToBinary
|args=object something
+
|args={{arg|object|something}}
|desc=Serialize an object to a series of bytes.
+
|desc=Serialize an object (same as using a BinaryFormatter).
 
}}
 
}}
 
{{MethodsEnd}}
 
{{MethodsEnd}}

Latest revision as of 23:13, 12 October 2012

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

IOTools Class

Provide some common IO tools that are needed by plugins.

Methods

The following are methods included in IOTools.

Signature Description
static object DeserializeFromBinary(byte[] input) Deserialize a binary serialized object
static byte[] SerializeToBinary(object something) Serialize an object (same as using a BinaryFormatter).