+2003-10-21 Michael Koch <konqueror@gmx.de>
+
+ * java/nio/ByteOrder.java,
+ java/nio/DirectByteBufferImpl.java,
+ java/nio/channels/FileChannelImpl.java:
+ Add code to load library with code for native methods if needed.
+
2003-10-21 Michael Koch <konqueror@gmx.de>
* gnu/java/net/PlainDatagramSocketImpl.java,
package java.nio;
+import gnu.classpath.Configuration;
+
/**
* @author Michael Koch
* @since 1.4
public static final ByteOrder BIG_ENDIAN = new ByteOrder();
public static final ByteOrder LITTLE_ENDIAN = new ByteOrder();
+ static
+ {
+ // load the shared library needed for native methods.
+ if (Configuration.INIT_LOAD_LIBRARY)
+ {
+ System.loadLibrary ("javanio");
+ }
+ }
+
/**
* Returns the native byte order of the platform currently running.
*/
package java.nio;
+import gnu.classpath.Configuration;
import gnu.gcj.RawData;
class DirectByteBufferImpl extends ByteBuffer
{
+ static
+ {
+ // load the shared library needed for native methods.
+ if (Configuration.INIT_LOAD_LIBRARY)
+ {
+ System.loadLibrary ("javanio");
+ }
+ }
+
RawData address;
private int offset;
private boolean readOnly;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.MappedByteBufferImpl;
+import gnu.classpath.Configuration;
import gnu.gcj.RawData;
/**
public class FileChannelImpl extends FileChannel
{
+ static
+ {
+ // load the shared library needed for native methods.
+ if (Configuration.INIT_LOAD_LIBRARY)
+ {
+ System.loadLibrary ("javanio");
+ }
+ }
+
public RawData map_address;
int length;