* gnu/java/nio/DatagramChannelImpl.java
(DatagramChannelImpl): Made class final.
(blocking): Made private.
(socket): Made it a NIODatagramSocket and private.
(DatagramChannelImpl): create NIODatagramSocket instead of
DatagramSocket.
(implConfigureBlocking): Set socket timeout.
(connect): Check that channel is not closed.
(write): Implemented.
(write): Rewritten.
(read): Implemented.
(read): Rewritten.
(receive): Implemented.
(send): Implemented.
* gnu/java/nio/SelectionKeyImpl.java
(readyOps): Made private.
(interestOps): Made private.
(impl): Made private.
(ch): Made private.
(readyOps): Check if selection key is valid.
(interestOps): Likewise.
* gnu/java/nio/SelectorImpl.java
(closed): Removed.
(keys): Made private.
(selected): Made private.
(finalize): New method.
(implCloseSelector): Rewritten.
(keys): Return unmodifiable Set.
(deregisterCancelledKeys): Fixed typo in method name.
* gnu/java/nio/SocketChannelImpl.java
(SocketChannelImpl): Made class final.
(socket): Made it a NIOSocket and private.
(blocking): Made private.
(connected): Made private.
(connectionPending): New member variable.
(SocketChannelImpl): New implementation.
(finalizer): Use isConnected().
(connect): Rewritten.
(finishConnect): Throws IOException, implemented.
(isConnectionPending): Return connectionPending.
(read): Rewritten.
(write): Rewritten.
* gnu/java/nio/NIOConstants.java: New file.
* Makefile.am (ordinary_java_source_files):
Added gnu/java/nio/NIOConstants.java.
* Makefile.in: Regenerated.
From-SVN: r71769
* gnu/java/nio/SelectorImpl.java
(register): Use fd with value 0 for now, will be fixed later.
* gnu/java/nio/ServerSocketChannelImpl.java
(fd): Removed.
(local_port): Removed.
(InetSocketAddress): Removed.
(ServerSocketChannelImpl): Just initialize internal socket object.
(implCloseSelectableChannel): Close internal socket object.
(implConfigureBlocking): Added comment.
(accept): Use jaba.net stuff to accept socket.
* gnu/java/nio/SocketChannelImpl.java
(fd): Removed.
(local_port): Removed.
(InetSocketAddress): Removed.
(SocketCreate): Removed.
(SocketConnect): Removed.
(SocketBind): Removed.
(SocketListen): Removed.
(SocketAvailable): Removed.
(SocketClose): Removed.
(SocketRead): Removed.
(SocketWrite): Removed.
(SocketChannelImpl): Just initialize internal socket object.
(implCloseSelectableChannel): Close internal socket object.
(implConfigureBlocking): Fixed implementation, added comment.
(connect): Use internal socket object to connect.
(socket): No need for sanity checks.
(read): Comment out some stuff, this will be reimplemented in the next
commit.
(write): Likewise.
* gnu/java/nio/natFileChannelImpl.cc
(nio_mmap_file): Line wrapped.
* gnu/java/nio/natSocketChannelImpl.cc: Removed.
* Makefile.am
(nat_source_files): Removeded gnu/java/nio/natSocketChannelImpl.cc.
* Makefile.in: Regenerated.
From-SVN: r68145
* gnu/java/nio/DatagramChannelImpl:
(fd): New member variable to store file descriptor of socket.
* gnu/java/nio/SelectionKeyImpl.java:
(ops): Removed.
(readyOps): New member variable.
(interestOps): New member variable.
(readyOps): Implemented.
(readyOps): New method to set member variable readyOps.
(interestOps): Replaced ops by interestOps.
* gnu/java/nio/SelectorImpl.java:
(SelectorImpl): Initialize key sets.
(select): Call select with -1 instead of Long.MAX_VALUE).
(java_do_select): Make it a native method.
(getFDsAsArray): New helper method.
(select): Remove canceled keys, give only interested file discriptors
to java_do_select, set ready ops.
(add): No need to initialize keys set here.
(add_selected): No need to initialize selected set here.
(deregisterCanceledKeys): New helper method.
(register): Set interest ops, set attachments, added handling of datagram
channels.
* gnu/java/nio/ServerSocketChannelImpl:
(SocketAccept): Renamed from NioSocketAccept.
(implConfigureBlocking): Implemented.
(accept): Use SocketAccept instead of NioSocketAccept.
* gnu/java/nio/SocketChannelImpl:
Reactivate native methods.
From-SVN: r59632