Class MappedAccessorByte
A memory mapped accessor that stores shorts.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.IO.Mapped.Accessors
Assembly: Mars.IO.dll
Syntax
public sealed class MappedAccessorByte : MappedAccessor<byte>, IDisposable
Constructors
| Improve this Doc View SourceMappedAccessorByte(MemoryMap, Stream)
Creates a new memory mapped file.
Declaration
public MappedAccessorByte(MemoryMap file, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
MemoryMap | file | |
System.IO.Stream | stream |
Methods
| Improve this Doc View SourceReadArray(Int64, Byte[], Int32, Int32)
Reads elements starting at the given position.
Declaration
public override int ReadArray(long position, byte[] array, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | |
System.Byte[] | array | |
System.Int32 | offset | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Mars.Common.IO.Mapped.MappedAccessor<System.Byte>.ReadArray(System.Int64, System.Byte[], System.Int32, System.Int32)
|
Improve this Doc
View Source
ReadFrom(Stream, Int64, ref Byte)
Reads appropriate amount of bytes from the stream at the given position and returns the structure.
Declaration
public override long ReadFrom(Stream stream, long position, ref byte structure)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | |
System.Int64 | position | |
System.Byte | structure |
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
Mars.Common.IO.Mapped.MappedAccessor<System.Byte>.ReadFrom(System.IO.Stream, System.Int64, System.Byte)
|
Improve this Doc
View Source
WriteArray(Int64, Byte[], Int32, Int32)
Writes an array of elements at the given position.
Declaration
public override long WriteArray(long position, byte[] array, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | position | |
System.Byte[] | array | |
System.Int32 | offset | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
Mars.Common.IO.Mapped.MappedAccessor<System.Byte>.WriteArray(System.Int64, System.Byte[], System.Int32, System.Int32)
|
Improve this Doc
View Source
WriteTo(Stream, Int64, ref Byte)
Converts the structure to bytes and writes them to the stream.
Declaration
public override long WriteTo(Stream stream, long position, ref byte structure)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | |
System.Int64 | position | |
System.Byte | structure |
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
Mars.Common.IO.Mapped.MappedAccessor<System.Byte>.WriteTo(System.IO.Stream, System.Int64, System.Byte)
Implements
System.IDisposable