/** * Construct a new ChannelDescriptor with the given channel, file number, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. The channel's capabilities will be used * to determine the "original" set of mode flags. This version generates a * new fileno. * * @param channel The channel for the new descriptor */ public ChannelDescriptor(Channel channel) throws InvalidValueException { this(channel, getModesFromChannel(channel), getDescriptorFromChannel(channel)); }
/** * Construct a new ChannelDescriptor with the given channel, file number, mode flags, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. * * @param channel The channel for the new descriptor * @param originalModes The mode flags for the new descriptor */ public ChannelDescriptor(Channel channel, ModeFlags originalModes) { this(channel, getNewFileno(), originalModes, getDescriptorFromChannel(channel), new AtomicInteger(1), true, false); }
/** * Construct a new ChannelDescriptor with the given channel, file number, mode flags, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. * * @param channel The channel for the new descriptor * @param originalModes The mode flags for the new descriptor */ public ChannelDescriptor(Channel channel, ModeFlags originalModes) { this(channel, getNewFileno(), originalModes, getDescriptorFromChannel(channel), new AtomicInteger(1), true, false); }
/** * Construct a new ChannelDescriptor with the given channel, file number, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. The channel's capabilities will be used * to determine the "original" set of mode flags. This version generates a * new fileno. * * @param channel The channel for the new descriptor */ public ChannelDescriptor(Channel channel) throws InvalidValueException { this(channel, getModesFromChannel(channel), getDescriptorFromChannel(channel)); }
FileDescriptor fd = ChannelDescriptor.getDescriptorFromChannel(channel); int real_fd = JavaLibCHelper.getfdFromDescriptor(fd);
FileDescriptor fd = ChannelDescriptor.getDescriptorFromChannel(channel); int real_fd = JavaLibCHelper.getfdFromDescriptor(fd);