// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_nio_channels_FileChannelImpl__
#define __java_nio_channels_FileChannelImpl__

#pragma interface

#include <java/nio/channels/FileChannel.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace nio
    {
      class ByteBuffer;
      namespace channels
      {
        class FileChannelImpl;
        class FileLock;
        class ReadableByteChannel;
        class WritableByteChannel;
        class FileChannel$MapMode;
        class FileChannel;
      }
      class MappedByteBuffer;
    }
  }
  namespace gnu
  {
    namespace gcj
    {
      class RawData;
    }
  }
}

class java::nio::channels::FileChannelImpl : public ::java::nio::channels::FileChannel
{
public:
  FileChannelImpl (::java::io::FileDescriptor *, jboolean, ::java::lang::Object *);
  FileChannelImpl ();
private:
  jlong implPosition ();
  ::java::nio::channels::FileChannel *implPosition (jlong);
  ::java::nio::channels::FileChannel *implTruncate (jlong);
  ::gnu::gcj::RawData *nio_mmap_file (jlong, jlong, jint);
  void nio_unmmap_file (::gnu::gcj::RawData *, jint);
  void nio_msync (::gnu::gcj::RawData *, jint);
public:
  virtual jlong size ();
public:  // actually protected
  virtual void implCloseChannel ();
public:
  virtual jint read (::java::nio::ByteBuffer *);
  virtual jint read (::java::nio::ByteBuffer *, jlong);
private:
  jint implRead (::java::nio::ByteBuffer *);
  jint implRead (jbyteArray, jint, jint);
public:
  virtual jlong read (JArray< ::java::nio::ByteBuffer *> *, jint, jint);
  virtual jint write (::java::nio::ByteBuffer *);
  virtual jint write (::java::nio::ByteBuffer *, jlong);
private:
  jint implWrite (::java::nio::ByteBuffer *);
  jint implWrite (jbyteArray, jint, jint);
public:
  virtual jlong write (JArray< ::java::nio::ByteBuffer *> *, jint, jint);
  virtual ::java::nio::MappedByteBuffer *map (::java::nio::channels::FileChannel$MapMode *, jlong, jlong);
public: // actually package-private
  static ::java::nio::MappedByteBuffer *create_direct_mapped_buffer (::gnu::gcj::RawData *, jlong);
public:
  virtual void force (jboolean);
  virtual jlong transferTo (jlong, jlong, ::java::nio::channels::WritableByteChannel *);
  virtual jlong transferFrom (::java::nio::channels::ReadableByteChannel *, jlong, jlong);
  virtual ::java::nio::channels::FileLock *lock (jlong, jlong, jboolean);
  virtual ::java::nio::channels::FileLock *tryLock (jlong, jlong, jboolean);
  virtual jlong position ();
  virtual ::java::nio::channels::FileChannel *position (jlong);
  virtual ::java::nio::channels::FileChannel *truncate (jlong);
  ::gnu::gcj::RawData * __attribute__((aligned(__alignof__( ::java::nio::channels::FileChannel )))) map_address;
public: // actually package-private
  jint length;
  ::java::io::FileDescriptor *fd;
  ::java::nio::MappedByteBuffer *buf;
  ::java::lang::Object *file_obj;
public:

  static ::java::lang::Class class$;
};

#endif /* __java_nio_channels_FileChannelImpl__ */
