MtMemoryStream
Namespace: SharpPluginLoader.Core.IO
Represents a memory stream.
public class MtMemoryStream : MtStream, System.IDisposable
Inheritance Object → NativeWrapper → MtObject → MtStream → MtMemoryStream
Implements IDisposable
Properties
Buffer
The buffer of this memory stream.
public nint Buffer { get; }
Property Value
IsBufferOverflowed
Whether this memory stream is overflowed.
public bool IsBufferOverflowed { get; }
Property Value
Mode
Gets the mode this memory stream was created with.
public MemoryStreamMode Mode { get; }
Property Value
Flags
The flags of the stream.
public UInt32& Flags { get; }
Property Value
IsReadable
Whether the stream is readable.
public bool IsReadable { get; }
Property Value
IsWritable
Whether the stream is writable.
public bool IsWritable { get; }
Property Value
IsSeekable
Whether the stream is seekable.
public bool IsSeekable { get; }
Property Value
Position
Gets the position of the stream.
public long Position { get; }
Property Value
Length
Gets or sets the length of the stream.
public long Length { get; set; }
Property Value
Instance
The native pointer.
public nint Instance { get; set; }
Property Value
Constructors
MtMemoryStream(IntPtr)
public MtMemoryStream(nint instance)
Parameters
instance
IntPtr
MtMemoryStream()
public MtMemoryStream()
Methods
Create()
Creates a new expandable memory stream.
public static MtMemoryStream Create()
Returns
MtMemoryStream
The new memory stream or null if it could not be created.
Create(Byte[])
Creates a new memory stream from the specified buffer.
public static MtMemoryStream Create(Byte[] buffer)
Parameters
buffer
Byte[]
The buffer to use
Returns
MtMemoryStream
The new memory stream or null if it could not be created.
Remarks:
Note that the memory stream returned by this method is not expandable. It also does not take ownership of the buffer.
Dispose()
public void Dispose()
Finalize()
protected void Finalize()