NativeMemoryStream Class
Namespace: Stride.Core.IO
Assembly: Stride.Core.dll
A System.IO.MemoryStream over a native memory region.
System.Object →
System.MarshalByRefObject →
System.IO.Stream →
NativeStream →
NativeMemoryStream
Derived from NativeMemoryStream:
public class NativeMemoryStream : NativeStream, IDisposable
|
Improve this Doc
View Source
Constructors
NativeMemoryStream(Byte*, Int64)
public NativeMemoryStream(byte *data, long length)
Parameters
Type |
Name |
Description |
System.Byte* |
data |
The native data pointer.
|
System.Int64 |
length |
The data length.
|
NativeMemoryStream(IntPtr, Int64)
public NativeMemoryStream(IntPtr data, long length)
Parameters
Type |
Name |
Description |
System.IntPtr |
data |
The native data pointer.
|
System.Int64 |
length |
The data length.
|
|
Improve this Doc
View Source
Properties
CanRead
public override bool CanRead { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
System.IO.Stream.CanRead
CanSeek
public override bool CanSeek { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
System.IO.Stream.CanSeek
CanWrite
public override bool CanWrite { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
System.IO.Stream.CanWrite
Length
public override long Length { get; }
Property Value
Type |
Description |
System.Int64 |
|
Overrides
System.IO.Stream.Length
Position
public override long Position { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
Overrides
System.IO.Stream.Position
|
Improve this Doc
View Source
Methods
Flush()
public override void Flush()
Overrides
System.IO.Stream.Flush()
Read(Byte[], Int32, Int32)
public override int Read(byte[] buffer, int offset, int count)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.IO.Stream.Read(System.Byte[], System.Int32, System.Int32)
Read(IntPtr, Int32)
Reads a block of bytes from the stream and writes the data in a given buffer.
public override int Read(IntPtr buffer, int count)
Parameters
Type |
Name |
Description |
System.IntPtr |
buffer |
When this method returns, contains the specified buffer with the values between 0 and (count - 1) replaced by the bytes read from the current source.
|
System.Int32 |
count |
The maximum number of bytes to read.
|
Returns
Type |
Description |
System.Int32 |
The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached.
|
Overrides
Exceptions
Type |
Condition |
System.ArgumentNullException |
array is null.
|
ReadByte()
public override int ReadByte()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.IO.Stream.ReadByte()
ReadUInt16()
public override ushort ReadUInt16()
Returns
Type |
Description |
System.UInt16 |
|
Overrides
ReadUInt32()
public override uint ReadUInt32()
Returns
Type |
Description |
System.UInt32 |
|
Overrides
ReadUInt64()
public override ulong ReadUInt64()
Returns
Type |
Description |
System.UInt64 |
|
Overrides
Seek(Int64, SeekOrigin)
public override long Seek(long offset, SeekOrigin origin)
Parameters
Type |
Name |
Description |
System.Int64 |
offset |
|
System.IO.SeekOrigin |
origin |
|
Returns
Type |
Description |
System.Int64 |
|
Overrides
System.IO.Stream.Seek(System.Int64, System.IO.SeekOrigin)
SetLength(Int64)
public override void SetLength(long value)
Parameters
Type |
Name |
Description |
System.Int64 |
value |
|
Overrides
System.IO.Stream.SetLength(System.Int64)
Write(Byte[], Int32, Int32)
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
Overrides
System.IO.Stream.Write(System.Byte[], System.Int32, System.Int32)
Write(IntPtr, Int32)
Writes a block of bytes to this stream using data from a buffer.
public override void Write(IntPtr buffer, int count)
Parameters
Type |
Name |
Description |
System.IntPtr |
buffer |
The buffer containing data to write to the stream.
|
System.Int32 |
count |
The number of bytes to be written to the current stream.
|
Overrides
Write(UInt16)
public override void Write(ushort i)
Parameters
Type |
Name |
Description |
System.UInt16 |
i |
|
Overrides
Write(UInt32)
public override void Write(uint i)
Parameters
Type |
Name |
Description |
System.UInt32 |
i |
|
Overrides
Write(UInt64)
public override void Write(ulong i)
Parameters
Type |
Name |
Description |
System.UInt64 |
i |
|
Overrides
WriteByte(Byte)
public override void WriteByte(byte value)
Parameters
Type |
Name |
Description |
System.Byte |
value |
|
Overrides
System.IO.Stream.WriteByte(System.Byte)
System.IO.Stream.Null
System.IO.Stream.BeginRead(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
System.IO.Stream.BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
System.IO.Stream.Close()
System.IO.Stream.CopyTo(System.IO.Stream)
System.IO.Stream.CopyTo(System.IO.Stream, System.Int32)
System.IO.Stream.CopyToAsync(System.IO.Stream)
System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32)
System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32, System.Threading.CancellationToken)
System.IO.Stream.CreateWaitHandle()
System.IO.Stream.Dispose()
System.IO.Stream.Dispose(System.Boolean)
System.IO.Stream.EndRead(System.IAsyncResult)
System.IO.Stream.EndWrite(System.IAsyncResult)
System.IO.Stream.FlushAsync()
System.IO.Stream.FlushAsync(System.Threading.CancellationToken)
System.IO.Stream.ObjectInvariant()
System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32)
System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)
System.IO.Stream.Synchronized(System.IO.Stream)
System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32)
System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)
System.IO.Stream.CanTimeout
System.IO.Stream.ReadTimeout
System.IO.Stream.WriteTimeout
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
Extension Methods