1、可能是jdk版本不对
2、是

解决方案 »

  1.   

    1.加上  import java.nio.channels.FileChannel.MapMode;
         把  ioChannel.MAP_RW 改为FileChannel.MapMode.READ_WRITE
      

  2.   

    2
    public abstract long size() throws IOException
      Returns the current size of this channel's file.
      

  3.   

    static FileChannel.MapMode READ_WRITE   是静态的 !
     size() 
     Returns the current size of this channel's file.