Name
FileChannel.MapMode
Synopsis
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
MappedByteBufferreturned by themap( )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
FileChannelmust have been created from ajava.io.RandomAccessFileopened 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( ); }
Passed To
FileChannel.map( )
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access