Java.Nio.Channels.FileChannel.Map Method
Maps the file into memory.

Syntax

[Android.Runtime.Register("map", "(Ljava/nio/channels/FileChannel$MapMode;JJ)Ljava/nio/MappedByteBuffer;", "GetMap_Ljava_nio_channels_FileChannel_MapMode_JJHandler")]
public abstract Java.Nio.MappedByteBuffer Map (FileChannel.MapMode mode, long position, long size)

Parameters

mode
one of the three mapping modes.
position
the starting position of the file.
size
the size of the region to map into memory.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Nio.Channels.NonReadableChannelExceptionif the FileChannel is not opened for reading but the given mode is "READ_ONLY".
Java.Nio.Channels.NonWritableChannelExceptionif the FileChannel is not opened for writing but the given mode is not "READ_ONLY".
Java.Lang.IllegalArgumentExceptionif the given parameters of position and size are not correct. Both must be non negative. size also must not be bigger than max integer.
Java.IO.IOExceptionif any I/O error occurs.

Remarks

Maps the file into memory. There can be three modes: read-only, read/write and private. After mapping, changes made to memory or the file channel do not affect the other storage place.

Note: mapping a file into memory is usually expensive.

[Android Documentation]

Requirements

Namespace: Java.Nio.Channels
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1