# FileChannel.MapMode

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# MapMode

```
open class MapMode
```

|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                 ||
| ↳ | [java.nio.channels.FileChannel.MapMode](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#) |

A typesafe enumeration for file-mapping modes.

## Summary

|                                                                                                                      Public methods                                                                                                                       ||
|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#toString())`()` Returns a string describing this file-mapping mode. |

|                                                                                                                                                   Properties                                                                                                                                                   ||
|---------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[FileChannel.MapMode](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#)! | [PRIVATE](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#PRIVATE:java.nio.channels.FileChannel.MapMode) Mode for a private (copy-on-write) mapping. |
| static[FileChannel.MapMode](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#)! | [READ_ONLY](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#READ_ONLY:java.nio.channels.FileChannel.MapMode) Mode for a read-only mapping.           |
| static[FileChannel.MapMode](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#)! | [READ_WRITE](https://developer.android.com/reference/kotlin/java/nio/channels/FileChannel.MapMode#READ_WRITE:java.nio.channels.FileChannel.MapMode) Mode for a read/write mapping.        |

## Public methods

### toString

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun toString(): String
```

Returns a string describing this file-mapping mode.

|                                                 Return                                                 ||
|----------------------------------------------------------------------------------|----------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | A descriptive string |

## Properties

### PRIVATE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PRIVATE: FileChannel.MapMode!
```

Mode for a private (copy-on-write) mapping.  

### READ_ONLY

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val READ_ONLY: FileChannel.MapMode!
```

Mode for a read-only mapping.  

### READ_WRITE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val READ_WRITE: FileChannel.MapMode!
```

Mode for a read/write mapping.