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

#ifndef __gnu_java_nio_DatagramChannelImpl__
#define __gnu_java_nio_DatagramChannelImpl__

#pragma interface

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

extern "Java"
{
  namespace java
  {
    namespace net
    {
      class SocketAddress;
      class DatagramSocket;
    }
    namespace nio
    {
      class ByteBuffer;
      namespace channels
      {
        class DatagramChannel;
        namespace spi
        {
          class SelectorProvider;
        }
      }
    }
  }
  namespace gnu
  {
    namespace java
    {
      namespace nio
      {
        class DatagramChannelImpl;
        class NIODatagramSocket;
      }
    }
  }
}

class gnu::java::nio::DatagramChannelImpl : public ::java::nio::channels::DatagramChannel
{
public:
  virtual jboolean isInChannelOperation () { return inChannelOperation; }
  virtual void setInChannelOperation (jboolean);
public:  // actually protected
  DatagramChannelImpl (::java::nio::channels::spi::SelectorProvider *);
public:
  virtual jint getNativeFD ();
  virtual ::java::net::DatagramSocket *socket () { return reinterpret_cast< ::java::net::DatagramSocket *> (socket__); }
public:  // actually protected
  virtual void implCloseSelectableChannel ();
  virtual void implConfigureBlocking (jboolean);
public:
  virtual ::java::nio::channels::DatagramChannel *connect (::java::net::SocketAddress *);
  virtual ::java::nio::channels::DatagramChannel *disconnect ();
  virtual jboolean isConnected ();
  virtual jint write (::java::nio::ByteBuffer *);
  virtual jlong write (JArray< ::java::nio::ByteBuffer *> *, jint, jint);
  virtual jint read (::java::nio::ByteBuffer *);
  virtual jlong read (JArray< ::java::nio::ByteBuffer *> *, jint, jint);
  virtual ::java::net::SocketAddress *receive (::java::nio::ByteBuffer *);
  virtual jint send (::java::nio::ByteBuffer *, ::java::net::SocketAddress *);
private:
  ::gnu::java::nio::NIODatagramSocket * __attribute__((aligned(__alignof__( ::java::nio::channels::DatagramChannel )))) socket__;
  jboolean inChannelOperation;
public:

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

#endif /* __gnu_java_nio_DatagramChannelImpl__ */
