Class AbstractNativeDatagramChannel

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.ByteChannel, java.nio.channels.Channel, java.nio.channels.GatheringByteChannel, java.nio.channels.InterruptibleChannel, java.nio.channels.MulticastChannel, java.nio.channels.NetworkChannel, java.nio.channels.ReadableByteChannel, java.nio.channels.ScatteringByteChannel, java.nio.channels.WritableByteChannel, jnr.enxio.channels.NativeSelectableChannel
    Direct Known Subclasses:
    UnixDatagramChannel

    public abstract class AbstractNativeDatagramChannel
    extends java.nio.channels.DatagramChannel
    implements java.nio.channels.ByteChannel, jnr.enxio.channels.NativeSelectableChannel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFD()  
      protected void implCloseSelectableChannel()  
      protected void implConfigureBlocking​(boolean block)  
      int read​(java.nio.ByteBuffer dst)  
      long read​(java.nio.ByteBuffer[] dsts, int offset, int length)  
      void setFD​(int fd)  
      int write​(java.nio.ByteBuffer src)  
      long write​(java.nio.ByteBuffer[] srcs, int offset, int length)  
      • Methods inherited from class java.nio.channels.DatagramChannel

        bind, connect, disconnect, getLocalAddress, getRemoteAddress, isConnected, open, open, read, receive, send, setOption, socket, validOps, write
      • Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel

        blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
      • Methods inherited from class java.nio.channels.SelectableChannel

        register
      • Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel

        begin, close, end, isOpen
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.nio.channels.Channel

        isOpen
      • Methods inherited from interface java.nio.channels.MulticastChannel

        close, join, join
      • Methods inherited from interface java.nio.channels.NetworkChannel

        getOption, supportedOptions
    • Constructor Detail

      • AbstractNativeDatagramChannel

        public AbstractNativeDatagramChannel​(int fd)
    • Method Detail

      • setFD

        public void setFD​(int fd)
      • getFD

        public final int getFD()
        Specified by:
        getFD in interface jnr.enxio.channels.NativeSelectableChannel
      • implCloseSelectableChannel

        protected void implCloseSelectableChannel()
                                           throws java.io.IOException
        Specified by:
        implCloseSelectableChannel in class java.nio.channels.spi.AbstractSelectableChannel
        Throws:
        java.io.IOException
      • implConfigureBlocking

        protected void implConfigureBlocking​(boolean block)
                                      throws java.io.IOException
        Specified by:
        implConfigureBlocking in class java.nio.channels.spi.AbstractSelectableChannel
        Throws:
        java.io.IOException
      • read

        public int read​(java.nio.ByteBuffer dst)
                 throws java.io.IOException
        Specified by:
        read in interface java.nio.channels.ReadableByteChannel
        Specified by:
        read in class java.nio.channels.DatagramChannel
        Throws:
        java.io.IOException
      • read

        public long read​(java.nio.ByteBuffer[] dsts,
                         int offset,
                         int length)
                  throws java.io.IOException
        Specified by:
        read in interface java.nio.channels.ScatteringByteChannel
        Specified by:
        read in class java.nio.channels.DatagramChannel
        Throws:
        java.io.IOException
      • write

        public int write​(java.nio.ByteBuffer src)
                  throws java.io.IOException
        Specified by:
        write in interface java.nio.channels.WritableByteChannel
        Specified by:
        write in class java.nio.channels.DatagramChannel
        Throws:
        java.io.IOException
      • write

        public long write​(java.nio.ByteBuffer[] srcs,
                          int offset,
                          int length)
                   throws java.io.IOException
        Specified by:
        write in interface java.nio.channels.GatheringByteChannel
        Specified by:
        write in class java.nio.channels.DatagramChannel
        Throws:
        java.io.IOException