src/solaris/classes/sun/nio/fs/UnixChannelFactory.java
Print this page
rev 6099 : [mq]: io-trace
*** 98,111 ****
/**
* Constructs a file channel from an existing (open) file descriptor
*/
! static FileChannel newFileChannel(int fd, boolean reading, boolean writing) {
FileDescriptor fdObj = new FileDescriptor();
fdAccess.set(fdObj, fd);
! return FileChannelImpl.open(fdObj, reading, writing, null);
}
/**
* Constructs a file channel by opening a file using a dfd/path pair
*/
--- 98,111 ----
/**
* Constructs a file channel from an existing (open) file descriptor
*/
! static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) {
FileDescriptor fdObj = new FileDescriptor();
fdAccess.set(fdObj, fd);
! return FileChannelImpl.open(fdObj, path, reading, writing, null);
}
/**
* Constructs a file channel by opening a file using a dfd/path pair
*/
*** 132,142 ****
throw new IllegalArgumentException("READ + APPEND not allowed");
if (flags.append && flags.truncateExisting)
throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed");
FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode);
! return FileChannelImpl.open(fdObj, flags.read, flags.write, flags.append, null);
}
/**
* Constructs a file channel by opening the given file.
*/
--- 132,143 ----
throw new IllegalArgumentException("READ + APPEND not allowed");
if (flags.append && flags.truncateExisting)
throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed");
FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode);
! return FileChannelImpl.open(fdObj, path.toString(),
! flags.read, flags.write, flags.append, null);
}
/**
* Constructs a file channel by opening the given file.
*/