Difference between revisions of "API:MemoryStream"
From Kerbal Space Program Wiki
Line 5: | Line 5: | ||
|summary=Useful for manipulating bytes in memory. | |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 |
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() |