Files
gcc/libjava/gnu/java/nio/natMappedByteFileBuffer.cc
T
Michael Koch 54c99af155 2003-03-20 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/FileChannelImpl.java
	(address): Removed.
	(map_address): New member variable.
	(length): Make it package private.
	(fd): Make it package private.
	(buf): Make it package private.
	(file_obj): Make it package private.
	(FileChannelImpl): New constructor.
	(nio_mmap_file): Use RawData instead of long.
	(nio_munmap_file): Use RawData instead of long.
	(nio_msync): Use RawData instead of long.
	(implCloseChannel): New implementation using map_address.
	(read): Reformated.
	(map): Implemented.
	(create_direct_mapped_buffer): Implemented, use RawData, throws
	IOException.
	(force): Use map_address instead of address.
	* gnu/java/nio/MappedByteFileBuffer.java
	(address): Removed.
	(map_address): New member variable.
	(MappedByteFileBuffer): Use map_address instead of address, reformated.
	(several methods): Use map_address instead of address, replaced long
	with RawData where appropriate.
	* gnu/java/nio/natFileChannelImpl.cc
	(nio_mmap_file): Replaced long with RawData.
	(nio_munmap_file): Replaced long with RawData.
	(nio_msync): Replaced long with RawData.
	* gnu/java/nio/natMappedByteFileBuffer.cc
	(several methods): Replaced long with RawData where appropriate.

From-SVN: r64612
2003-03-20 11:14:35 +00:00

149 lines
5.1 KiB
C++

// natMappedByteFileBuffer.cc
/* Copyright (C) 2003 Free Software Foundation
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
#include <config.h>
#include <jvm.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <gnu/gcj/RawData.h>
#include <gnu/java/nio/MappedByteFileBuffer.h>
#include <java/lang/Error.h>
jbyte
gnu::java::nio::MappedByteFileBuffer::nio_read_Byte_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
jchar
gnu::java::nio::MappedByteFileBuffer::nio_read_Char_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
jdouble
gnu::java::nio::MappedByteFileBuffer::nio_read_Double_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
jfloat
gnu::java::nio::MappedByteFileBuffer::nio_read_Float_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
jint
gnu::java::nio::MappedByteFileBuffer::nio_read_Int_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
jlong
gnu::java::nio::MappedByteFileBuffer::nio_read_Long_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
jshort
gnu::java::nio::MappedByteFileBuffer::nio_read_Short_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Byte_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jbyte,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Char_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jchar,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Double_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jdouble,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Float_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jfloat,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Int_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jint,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Long_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jlong,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}
void
gnu::java::nio::MappedByteFileBuffer::nio_write_Short_file_channel
(gnu::java::nio::FileChannelImpl*,
jint, jint, jshort,
gnu::gcj::RawData*)
{
throw new ::java::lang::Error (_Jv_NewStringUTF ("not implemented"));
}