Class MemoryMapStream
A mapped file that is using a single stream.
Inheritance
IDisposable
MemoryMapStream
Assembly: Mars.IO.dll
Syntax
public class MemoryMapStream : MemoryMap
Constructors
MemoryMapStream()
Creates a new mapped stream using a memory stream.
Declaration
MemoryMapStream(Stream)
Creates a new mapped stream.
Declaration
public MemoryMapStream(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
The stream to read/write. |
Methods
DoCreateNewByte(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<byte> DoCreateNewByte(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewDouble(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<double> DoCreateNewDouble(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewInt16(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<short> DoCreateNewInt16(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewInt32(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<int> DoCreateNewInt32(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewInt64(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<long> DoCreateNewInt64(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewSingle(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<float> DoCreateNewSingle(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewUInt16(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<ushort> DoCreateNewUInt16(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewUInt32(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<uint> DoCreateNewUInt32(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateNewUInt64(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<ulong> DoCreateNewUInt64(long position, long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInBytes |
The size. |
Returns
Overrides
DoCreateVariable<T>(Int64, Int64, MemoryMap.ReadFromDelegate<T>, MemoryMap.WriteToDelegate<T>)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected override MappedAccessor<T> DoCreateVariable<T>(long position, long sizeInBytes, MemoryMap.ReadFromDelegate<T> readFrom, MemoryMap.WriteToDelegate<T> writeTo)
Parameters
Returns
Type Parameters
Overrides
Mars.Common.IO.Mapped.MemoryMap.DoCreateVariable<T>(System.Int64, System.Int64, Mars.Common.IO.Mapped.MemoryMap.ReadFromDelegate<T>, Mars.Common.IO.Mapped.MemoryMap.WriteToDelegate<T>)
Extension Methods