The UnmanagedMemoryStream type exposes the following members.
Constructors
| Name | Description |
---|
| UnmanagedMemoryStream()()()() |
Create a new, empty unmanaged memory stream. The memory stream can be resized by
setting Length, calling SetLength(Int64), or writing to
the stream.
|
| UnmanagedMemoryStream(Int64) |
Create a new unmanaged memory stream with storage for a certain number of bytes of
data. The length of the stream will be set to bytes, but the
contents of the stream after initialization are undefined.
|
Methods
Properties
| Name | Description |
---|
| Buffer |
Retrieve a pointer to the unmanaged memory buffer. Since this
buffer is pointing into unmanaged memory, it does not need to be
pinned.
|
| CanRead |
Whether the stream can be read from. Always true.
(Overrides StreamCanRead()()()().) |
| CanSeek |
Whether one can seek in the stream. Always true.
(Overrides StreamCanSeek()()()().) |
| CanTimeout | (Inherited from Stream.) |
| CanWrite |
Whether on can write to the stream. Always true.
(Overrides StreamCanWrite()()()().) |
| Capacity |
The amount of space in the unmanaged memory buffer. This can be
larger than the length of the stream. If you know how many bytes
will be written to the stream, you might want to set the capacity
(either via this property or through Reserve(Int64)) large
enough to avoid resizing the stream multiple times.
|
| Length |
The length of the stream, in bytes.
(Overrides StreamLength()()()().) |
| Position |
Reports or sets the position in the stream.
(Overrides StreamPosition()()()().) |
| ReadTimeout | (Inherited from Stream.) |
| WriteTimeout | (Inherited from Stream.) |
See Also