equal
deleted
inserted
replaced
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 } |