1 // natFileChannelImpl.cc
3 /* Copyright (C) 2003 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
17 #include <sys/types.h>
27 #include <gnu/gcj/RawData.h>
28 #include <gnu/java/nio/FileChannelImpl.h>
29 #include <java/io/FileDescriptor.h>
30 #include <java/io/IOException.h>
31 #include <java/nio/channels/FileChannel.h>
34 gnu::java::nio::FileChannelImpl::size ()
40 gnu::java::nio::FileChannelImpl::implPosition ()
42 return fd->getFilePointer ();
45 java::nio::channels::FileChannel*
46 gnu::java::nio::FileChannelImpl::implPosition (jlong newPosition)
48 fd->seek (newPosition, ::java::io::FileDescriptor::SET, true);
52 java::nio::channels::FileChannel*
53 gnu::java::nio::FileChannelImpl::implTruncate (jlong size)
60 gnu::java::nio::FileChannelImpl::nio_mmap_file (jlong pos, jlong size, jint /*mode*/)
62 throw new ::java::io::IOException (JvNewStringUTF ("mmap not implemented"));
66 gnu::java::nio::FileChannelImpl::nio_unmmap_file (gnu::gcj::RawData* map_address, jint size)
68 throw new ::java::io::IOException (JvNewStringUTF ("munmap not implemented"));
72 gnu::java::nio::FileChannelImpl::nio_msync (gnu::gcj::RawData* map_address, jint length)
74 throw new ::java::io::IOException (JvNewStringUTF ("msync not implemented"));