Difference between revisions of "API:MemoryStream"
From Kerbal Space Program Wiki
(Created page with "<!-- Autogenerated by WRAPTOOL. Yell at N3X15 if it breaks. --> {{Namespace:KSP.IO}} {{Class |name=MemoryStream |summary=summary goes here }} {{MethodsStart}} {{Method |retur...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <!-- Autogenerated by | + | <!-- Autogenerated by DOCTOOL. Yell at N3X15 if it breaks. --> |
{{Namespace:KSP.IO}} | {{Namespace:KSP.IO}} | ||
{{Class | {{Class | ||
|name=MemoryStream | |name=MemoryStream | ||
− | |summary= | + | |summary=Useful for manipulating bytes in memory. |
}} | }} | ||
+ | {{PropertiesStart}} | ||
+ | {{Property | ||
+ | |type=long | ||
+ | |name=Length | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=bool | ||
+ | |name=CanWrite | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=int | ||
+ | |name=Capacity | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset=1 | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=bool | ||
+ | |name=CanRead | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=long | ||
+ | |name=Position | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset=1 | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=bool | ||
+ | |name=CanSeek | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{PropertiesEnd}} | ||
{{MethodsStart}} | {{MethodsStart}} | ||
{{Method | {{Method | ||
Line 10: | Line 54: | ||
|returndesc= | |returndesc= | ||
|name=SetLength | |name=SetLength | ||
− | |args=long value | + | |args={{arg|long|value}} |
|desc= | |desc= | ||
}} | }} | ||
Line 17: | Line 61: | ||
|returndesc= | |returndesc= | ||
|name=WriteByte | |name=WriteByte | ||
− | |args=byte value | + | |args={{arg|byte|value}} |
|desc= | |desc= | ||
}} | }} | ||
Line 31: | Line 75: | ||
|returndesc= | |returndesc= | ||
|name=Seek | |name=Seek | ||
− | |args=long offset, SeekOrigin loc | + | |args={{arg|long|offset}}, {{arg|SeekOrigin|loc}} |
|desc= | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
− | |returntype=byte[] | + | |returntype=byte |
+ | |array=[] | ||
|returndesc= | |returndesc= | ||
|name=ToArray | |name=ToArray | ||
Line 42: | Line 87: | ||
}} | }} | ||
{{Method | {{Method | ||
− | |returntype=byte[] | + | |returntype=byte |
+ | |array=[] | ||
|returndesc= | |returndesc= | ||
|name=GetBuffer | |name=GetBuffer | ||
Line 52: | Line 98: | ||
|returndesc= | |returndesc= | ||
|name=Read | |name=Read | ||
− | |args=byte[] | + | |args={{arg|byte|buffer|array=[]}}, {{arg|int|offset}}, {{arg|int|count}} |
|desc= | |desc= | ||
}} | }} | ||
Line 59: | Line 105: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args=byte[] | + | |args={{arg|byte|buffer|array=[]}}, {{arg|int|offset}}, {{arg|int|count}} |
|desc= | |desc= | ||
}} | }} |
Latest revision as of 23:47, 12 October 2012
KSP.IO Namespace
BinaryReader ·
BinaryWriter ·
File ·
FileInfo ·
FileStream ·
IOException ·
IOTools ·
IOUtils ·
MemoryStream ·
PluginConfigNode ·
PluginConfiguration ·
TextReader ·
TextWriter
MemoryStream Class
Useful for manipulating bytes in memory.
Properties
The following are public properties available in MemoryStream.
Signature | Description |
---|---|
long Length { get; } | |
bool CanWrite { get; } | |
int Capacity { get; set; } | |
bool CanRead { get; } | |
long Position { get; set; } | |
bool CanSeek { get; } |
Methods
The following are methods included in MemoryStream.
Signature | Description |
---|---|
void SetLength(long value) | |
void WriteByte(byte value) | |
int ReadByte() | |
long Seek(long offset, SeekOrigin loc) | |
byte[] ToArray() | |
byte[] GetBuffer() | |
int Read(byte[] buffer, int offset, int count) | |
void Write(byte[] buffer, int offset, int count) | |
void Flush() |