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
MappedByteBuffer
returned 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
FileChannel
must have been created from ajava.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( ); }
Passed To
FileChannel.map( )
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.