OSDN Git Service

2003-12-02 Michael Koch <konqueror@gmx.de>
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2003 15:03:21 +0000 (15:03 +0000)
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2003 15:03:21 +0000 (15:03 +0000)
* gnu/java/nio/DatagramChannelImpl.java
(blocking): Initialize with true by default.
* gnu/java/nio/ServerSocketChannelImpl.java
(serverSocket): Made private.
(blocking): Likewise.
(connected): Likewise.
* gnu/java/nio/SocketChannelImpl.java
(connectionPending): Made private.
* gnu/java/nio/FileLockImpl.java
(static): Load native library (needed for classpath).
* gnu/java/nio/SelectorImpl.java
(static): Load native library (needed for classpath).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74181 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/gnu/java/nio/DatagramChannelImpl.java
libjava/gnu/java/nio/FileLockImpl.java
libjava/gnu/java/nio/SelectorImpl.java
libjava/gnu/java/nio/ServerSocketChannelImpl.java
libjava/gnu/java/nio/SocketChannelImpl.java

index f652a2c..690a4f7 100644 (file)
@@ -1,5 +1,20 @@
 2003-12-02  Michael Koch  <konqueror@gmx.de>
 
+       * gnu/java/nio/DatagramChannelImpl.java
+       (blocking): Initialize with true by default.
+       * gnu/java/nio/ServerSocketChannelImpl.java
+       (serverSocket): Made private.
+       (blocking): Likewise.
+       (connected): Likewise.
+       * gnu/java/nio/SocketChannelImpl.java
+       (connectionPending): Made private.
+       * gnu/java/nio/FileLockImpl.java
+       (static): Load native library (needed for classpath).
+       * gnu/java/nio/SelectorImpl.java
+       (static): Load native library (needed for classpath).
+
+2003-12-02  Michael Koch  <konqueror@gmx.de>
+
        * gnu/java/net/protocol/file/Connection.java
        (getLastModified): Implement for file connections.
        (getContentLength): Likewise.
index a77355d..af43256 100644 (file)
@@ -56,7 +56,7 @@ import java.nio.channels.spi.SelectorProvider;
 public final class DatagramChannelImpl extends DatagramChannel
 {
   private NIODatagramSocket socket;
-  private boolean blocking = false;
+  private boolean blocking = true;
   
   protected DatagramChannelImpl (SelectorProvider provider)
     throws IOException
index 189e03a..f85d60a 100644 (file)
@@ -42,6 +42,7 @@ import java.io.FileDescriptor;
 import java.io.IOException;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
+import gnu.classpath.Configuration;
 
 /**
  * @author Michael Koch
@@ -49,6 +50,15 @@ import java.nio.channels.FileLock;
  */
 public class FileLockImpl extends FileLock
 {
+  static
+  {
+    // load the shared library needed for native methods.
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+        System.loadLibrary ("javanio");
+      }
+  }
+  
   private FileDescriptor fd;
   private boolean released;
   
index 60a81f9..05a537a 100644 (file)
@@ -49,9 +49,19 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+import gnu.classpath.Configuration;
 
 public class SelectorImpl extends AbstractSelector
 {
+  static
+  {
+    // load the shared library needed for native methods.
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+        System.loadLibrary ("javanio");
+      }
+  }
+  
   private Set keys;
   private Set selected;
 
index 89bbdec..97943c0 100644 (file)
@@ -54,9 +54,9 @@ import java.nio.channels.spi.SelectorProvider;
 
 public final class ServerSocketChannelImpl extends ServerSocketChannel
 {
-  NIOServerSocket serverSocket;
-  boolean blocking = true;
-  boolean connected = false;
+  private NIOServerSocket serverSocket;
+  private boolean blocking = true;
+  private boolean connected;
 
   protected ServerSocketChannelImpl (SelectorProvider provider)
     throws IOException
index ae7af3c..46c0d8c 100644 (file)
@@ -66,7 +66,7 @@ public final class SocketChannelImpl extends SocketChannel
   private PlainSocketImpl impl;
   private NIOSocket socket;
   private boolean blocking = true;
-  private boolean connectionPending = false;
+  private boolean connectionPending;
 
   SocketChannelImpl (SelectorProvider provider)
     throws IOException