Commit 598e749d by Michael Koch Committed by Michael Koch

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).

From-SVN: r74181
parent a74e3b77
2003-12-02 Michael Koch <konqueror@gmx.de> 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 * gnu/java/net/protocol/file/Connection.java
(getLastModified): Implement for file connections. (getLastModified): Implement for file connections.
(getContentLength): Likewise. (getContentLength): Likewise.
......
...@@ -56,7 +56,7 @@ import java.nio.channels.spi.SelectorProvider; ...@@ -56,7 +56,7 @@ import java.nio.channels.spi.SelectorProvider;
public final class DatagramChannelImpl extends DatagramChannel public final class DatagramChannelImpl extends DatagramChannel
{ {
private NIODatagramSocket socket; private NIODatagramSocket socket;
private boolean blocking = false; private boolean blocking = true;
protected DatagramChannelImpl (SelectorProvider provider) protected DatagramChannelImpl (SelectorProvider provider)
throws IOException throws IOException
......
...@@ -42,6 +42,7 @@ import java.io.FileDescriptor; ...@@ -42,6 +42,7 @@ import java.io.FileDescriptor;
import java.io.IOException; import java.io.IOException;
import java.nio.channels.FileChannel; import java.nio.channels.FileChannel;
import java.nio.channels.FileLock; import java.nio.channels.FileLock;
import gnu.classpath.Configuration;
/** /**
* @author Michael Koch * @author Michael Koch
...@@ -49,6 +50,15 @@ import java.nio.channels.FileLock; ...@@ -49,6 +50,15 @@ import java.nio.channels.FileLock;
*/ */
public class FileLockImpl extends 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 FileDescriptor fd;
private boolean released; private boolean released;
......
...@@ -49,9 +49,19 @@ import java.util.Collections; ...@@ -49,9 +49,19 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Set; import java.util.Set;
import gnu.classpath.Configuration;
public class SelectorImpl extends AbstractSelector 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 keys;
private Set selected; private Set selected;
......
...@@ -54,9 +54,9 @@ import java.nio.channels.spi.SelectorProvider; ...@@ -54,9 +54,9 @@ import java.nio.channels.spi.SelectorProvider;
public final class ServerSocketChannelImpl extends ServerSocketChannel public final class ServerSocketChannelImpl extends ServerSocketChannel
{ {
NIOServerSocket serverSocket; private NIOServerSocket serverSocket;
boolean blocking = true; private boolean blocking = true;
boolean connected = false; private boolean connected;
protected ServerSocketChannelImpl (SelectorProvider provider) protected ServerSocketChannelImpl (SelectorProvider provider)
throws IOException throws IOException
......
...@@ -66,7 +66,7 @@ public final class SocketChannelImpl extends SocketChannel ...@@ -66,7 +66,7 @@ public final class SocketChannelImpl extends SocketChannel
private PlainSocketImpl impl; private PlainSocketImpl impl;
private NIOSocket socket; private NIOSocket socket;
private boolean blocking = true; private boolean blocking = true;
private boolean connectionPending = false; private boolean connectionPending;
SocketChannelImpl (SelectorProvider provider) SocketChannelImpl (SelectorProvider provider)
throws IOException throws IOException
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment