Merged gcj-eclipse branch to trunk.

From-SVN: r120621
This commit is contained in:
Tom Tromey 2007-01-09 19:58:05 +00:00
parent c648dedbde
commit 97b8365caf
17478 changed files with 606493 additions and 100744 deletions

View file

@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.java.nio;
import java.io.IOException;
import java.nio.channels.spi.AbstractSelectableChannel;
public final class SocketChannelSelectionKey
@ -49,10 +50,16 @@ public final class SocketChannelSelectionKey
super (channel, selector);
}
// FIXME don't use file descriptor integers
public int getNativeFD()
{
NIOSocket socket =
(NIOSocket) ((SocketChannelImpl) ch).socket();
return socket.getPlainSocketImpl().getNativeFD();
try
{
return ((SocketChannelImpl) ch).getVMChannel().getState().getNativeFD();
}
catch (IOException ioe)
{
throw new IllegalStateException(ioe);
}
}
}