Share via


SharedMemory.MapReadOnly Method

Definition

Creates a read-only mapping of the entire shared memory region.

[Android.Runtime.Register("mapReadOnly", "()Ljava/nio/ByteBuffer;", "", ApiSince=27)]
public Java.Nio.ByteBuffer MapReadOnly ();
[<Android.Runtime.Register("mapReadOnly", "()Ljava/nio/ByteBuffer;", "", ApiSince=27)>]
member this.MapReadOnly : unit -> Java.Nio.ByteBuffer

Returns

A ByteBuffer mapping

Attributes

Remarks

Creates a read-only mapping of the entire shared memory region. This requires the the protection level of the shared memory is at least PROT_READ or the map will fail.

Use #map(int, int, int) to have more control over the mapping if desired. This is equivalent to map(OsConstants.PROT_READ, 0, getSize())

Java documentation for android.os.SharedMemory.mapReadOnly().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to