FileChannel.MapMode


FileChannel.MapMode java.nio.channels

Java 1.4

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  ( );   } 

Passed To

FileChannel.map( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net