jdk/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java
changeset 27263 819f5f87d485
parent 25859 3317bb8137f4
child 32834 e1dca5fe4de3
equal deleted inserted replaced
27262:82895f3a728a 27263:819f5f87d485
   158             throw new IllegalArgumentException("READ + APPEND not allowed");
   158             throw new IllegalArgumentException("READ + APPEND not allowed");
   159         if (flags.append && flags.truncateExisting)
   159         if (flags.append && flags.truncateExisting)
   160             throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed");
   160             throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed");
   161 
   161 
   162         FileDescriptor fdObj = open(pathForWindows, pathToCheck, flags, pSecurityDescriptor);
   162         FileDescriptor fdObj = open(pathForWindows, pathToCheck, flags, pSecurityDescriptor);
   163         return FileChannelImpl.open(fdObj, pathForWindows, flags.read, flags.write, flags.append, null);
   163         return FileChannelImpl.open(fdObj, pathForWindows, flags.read, flags.write, null);
   164     }
   164     }
   165 
   165 
   166     /**
   166     /**
   167      * Open/creates file, returning AsynchronousFileChannel to access the file
   167      * Open/creates file, returning AsynchronousFileChannel to access the file
   168      *
   168      *
   337         }
   337         }
   338 
   338 
   339         // create FileDescriptor and return
   339         // create FileDescriptor and return
   340         FileDescriptor fdObj = new FileDescriptor();
   340         FileDescriptor fdObj = new FileDescriptor();
   341         fdAccess.setHandle(fdObj, handle);
   341         fdAccess.setHandle(fdObj, handle);
       
   342         fdAccess.setAppend(fdObj, flags.append);
   342         return fdObj;
   343         return fdObj;
   343     }
   344     }
   344 }
   345 }