Index: include/java_nio_MappedByteBufferImpl.h =================================================================== RCS file: include/java_nio_MappedByteBufferImpl.h diff -N include/java_nio_MappedByteBufferImpl.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/java_nio_MappedByteBufferImpl.h 29 Apr 2004 14:36:10 -0000 @@ -0,0 +1,22 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#ifndef __java_nio_MappedByteBufferImpl__ +#define __java_nio_MappedByteBufferImpl__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +extern JNIEXPORT void JNICALL Java_java_nio_MappedByteBufferImpl_unmapImpl (JNIEnv *env, jobject); +extern JNIEXPORT jboolean JNICALL Java_java_nio_MappedByteBufferImpl_isLoadedImpl (JNIEnv *env, jobject); +extern JNIEXPORT void JNICALL Java_java_nio_MappedByteBufferImpl_loadImpl (JNIEnv *env, jobject); +extern JNIEXPORT void JNICALL Java_java_nio_MappedByteBufferImpl_forceImpl (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __java_nio_MappedByteBufferImpl__ */ Index: include/Makefile.am =================================================================== RCS file: /cvsroot/classpath/classpath/include/Makefile.am,v retrieving revision 1.17 diff -u -r1.17 Makefile.am --- include/Makefile.am 27 Apr 2004 22:56:05 -0000 1.17 +++ include/Makefile.am 29 Apr 2004 14:36:10 -0000 @@ -56,6 +56,7 @@ $(top_srcdir)/include/java_net_InetAddress.h \ $(top_srcdir)/include/java_net_NetworkInterface.h \ $(top_srcdir)/include/java_nio_DirectByteBufferImpl.h \ +$(top_srcdir)/include/java_nio_MappedByteBufferImpl.h \ $(top_srcdir)/include/java_util_TimeZone.h if CREATE_JNI_HEADERS @@ -166,6 +167,8 @@ $(JAVAH) -o $@ java.net.NetworkInterface $(top_srcdir)/include/java_nio_DirectByteBufferImpl.h: $(top_srcdir)/java/nio/DirectByteBufferImpl.java $(JAVAH) -o $@ java.nio.DirectByteBufferImpl +$(top_srcdir)/include/java_nio_MappedByteBufferImpl.h: $(top_srcdir)/java/nio/MappedByteBufferImpl.java + $(JAVAH) -o $@ java.nio.MappedByteBufferImpl $(top_srcdir)/include/gnu_java_nio_channels_FileChannelImpl.h: $(top_srcdir)/gnu/java/nio/channels/FileChannelImpl.java $(JAVAH) -o $@ gnu.java.nio.channels.FileChannelImpl $(top_srcdir)/include/java_util_TimeZone.h: $(top_srcdir)/java/util/TimeZone.java Index: native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c =================================================================== RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c,v retrieving revision 1.6 diff -u -r1.6 gnu_java_nio_channels_FileChannelImpl.c --- native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c 29 Apr 2004 08:44:08 -0000 1.6 +++ native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c 29 Apr 2004 14:36:10 -0000 @@ -479,7 +479,7 @@ JCL_ThrowException(env, "java/lang/UnsupportedOperationException", "not implemented - can't shorten files on this platform"); */ - JCL_ThrowException(env, IOException, + JCL_ThrowException(env, IO_EXCEPTION, "Unable to shorten file length"); #endif /* HAVE_FTRUNCATE */ } Index: native/jni/java-nio/java_nio_MappedByteBufferImpl.c =================================================================== RCS file: native/jni/java-nio/java_nio_MappedByteBufferImpl.c diff -N native/jni/java-nio/java_nio_MappedByteBufferImpl.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ native/jni/java-nio/java_nio_MappedByteBufferImpl.c 29 Apr 2004 14:36:10 -0000 @@ -0,0 +1,72 @@ +/* java_nio_MappedByteBufferImpl.c - Native methods for MappedByteBufferImpl + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +#include +#include + +#include +#include + +#include "java_nio_MappedByteBufferImpl.h" + +#define IO_EXCEPTION "java/io/IOException" + +JNIEXPORT void JNICALL +Java_java_nio_MappedByteBufferImpl_unmapImpl (JNIEnv *env, jclass class) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.MappedByteBufferImpl.unmapImpl(): not implemented"); +} + +JNIEXPORT jboolean JNICALL +Java_java_nio_MappedByteBufferImpl_isLoadedImpl (JNIEnv *env, jclass class) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.MappedByteBufferImpl.isLoadedImpl(): not implemented"); + return 0; +} + +JNIEXPORT void JNICALL +Java_java_nio_MappedByteBufferImpl_loadImpl (JNIEnv *env, jclass clazz) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.MappedByteBufferImpl.loadImpl(): not implemented"); +} + +JNIEXPORT void JNICALL +Java_java_nio_MappedByteBufferImpl_forceImpl (JNIEnv *env, jclass class) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.MappedByteBufferImpl.forceImpl(): not implemented"); +} + Index: native/jni/java-nio/Makefile.am =================================================================== RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/Makefile.am,v retrieving revision 1.6 diff -u -r1.6 Makefile.am --- native/jni/java-nio/Makefile.am 18 Apr 2004 15:41:17 -0000 1.6 +++ native/jni/java-nio/Makefile.am 29 Apr 2004 14:36:10 -0000 @@ -4,7 +4,8 @@ gnu_java_nio_PipeImpl.c \ gnu_java_nio_SelectorImpl.c \ gnu_java_nio_channels_FileChannelImpl.c \ - java_nio_DirectByteBufferImpl.c + java_nio_DirectByteBufferImpl.c \ + java_nio_MappedByteBufferImpl.c libjavanio_la_LDFLAGS = @CLASSPATH_MODULE@ libjavanio_la_LIBADD = $(top_builddir)/native/jni/classpath/jcl.lo