This
class defines three constants that
define the legal values of the mode
argument to the map( ) method of the
FileChannel class. The constants and their
meanings are the following:
- READ_ONLY
-
The memory mapping is read-only. The contents of the
MappedByteBuffer returned by the map(
) method may be read but may not be modified.
- READ_WRITE
-
The memory mapping is bidirectional: The contents of the returned
buffer can be modified, and any modifications will (eventually) be
written to the underlying file. The FileChannel
must have been created from a
java.io.RandomAccessFile opened in read/write
mode.
- PRIVATE
-
The returned buffer may be modified, but any such changes are private
to the buffer, and are never written to the underlying file. This
mapping mode is also known as
"copy-on-write."
public static class FileChannel.MapMode {
// No Constructor
// Public Constants
public static final FileChannel.MapMode PRIVATE;
public static final FileChannel.MapMode READ_ONLY;
public static final FileChannel.MapMode READ_WRITE;
// Public Methods Overriding Object
public String toString( );
}