API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.nio.channels. DatagramChannel View Source
Author(s)
Mark Reinhold
JSR-51 Expert Group
Since
1.4
Version
1.33, 05/11/17
Serial
Hierarchy
 Object
      AbstractInterruptibleChannel
          SelectableChannel
              AbstractSelectableChannel
                  DatagramChannel
Implements
 ByteChannel
 ScatteringByteChannel
 GatheringByteChannel
Subclasses
Description
publicabstract abstract class DatagramChannel
  A selectable channel for datagram-oriented sockets.
See also:   
Constructors
protected DatagramChannel (SelectorProvider provider)
Initializes a new instance of this class.
Methods
Hide/Show inherited methods
protectedfinal void begin () [Inherited From AbstractInterruptibleChannel]
  Marks the beginning of an I/O operation that might block indefinitely.
publicfinal Object blockingLock () [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
publicfinal void close () throws IOException [Inherited From AbstractInterruptibleChannel]
  Closes this channel.
publicfinal SelectableChannel configureBlocking (boolean block) throws IOException [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
  Adjusts this channel's blocking mode.
publicabstract DatagramChannel connect (SocketAddress remote) throws IOException
  Connects this channel's socket.
publicabstract DatagramChannel disconnect () throws IOException
  Disconnects this channel's socket.
protectedfinal void end (boolean completed) throws AsynchronousCloseException [Inherited From AbstractInterruptibleChannel]
  Marks the end of an I/O operation that might block indefinitely.
protectedfinal void implCloseChannel () throws IOException [Inherited From AbstractSelectableChannel] [Specified in AbstractInterruptibleChannel]
  Closes this channel.
protectedabstract void implCloseSelectableChannel () throws IOException [Inherited From AbstractSelectableChannel]
  Closes this selectable channel.
protectedabstract void implConfigureBlocking (boolean block) throws IOException [Inherited From AbstractSelectableChannel]
  Adjusts this channel's blocking mode.
publicfinal boolean isBlocking () [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
publicabstract boolean isConnected ()
  Tells whether or not this channel's socket is connected.
publicfinal boolean isOpen () [Inherited From AbstractInterruptibleChannel]
publicfinal boolean isRegistered () [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
publicfinal SelectionKey keyFor (Selector sel) [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
publicstatic DatagramChannel open () throws IOException
  Opens a datagram channel.
publicfinal SelectorProvider provider () [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
  Returns the provider that created this channel.
publicabstract int read (ByteBuffer dst) throws IOException
  Reads a datagram from this channel.
publicfinal long read (ByteBuffer dsts) throws IOException [Specified in ScatteringByteChannel]
  Reads a datagram from this channel.
publicabstract long read (ByteBuffer dsts, int offset, int length) throws IOException [Specified in ScatteringByteChannel]
  Reads a datagram from this channel.
publicabstract SocketAddress receive (ByteBuffer dst) throws IOException
  Receives a datagram via this channel.
publicfinal SelectionKey register (Selector sel, int ops) throws ClosedChannelException [Inherited From SelectableChannel]
  Registers this channel with the given selector, returning a selection key.
publicfinal SelectionKey register (Selector sel, int ops, Object att) throws ClosedChannelException [Inherited From AbstractSelectableChannel] [Specified in SelectableChannel]
  Registers this channel with the given selector, returning a selection key.
publicabstract int send (ByteBuffer src, SocketAddress target) throws IOException
  Sends a datagram via this channel.
publicabstract DatagramSocket socket ()
  Retrieves a datagram socket associated with this channel.
publicfinal int validOps () [Specified in SelectableChannel]
  Returns an operation set identifying this channel's supported operations.
publicabstract int write (ByteBuffer src) throws IOException
  Writes a datagram to this channel.
publicfinal long write (ByteBuffer srcs) throws IOException [Specified in GatheringByteChannel]
  Writes a datagram to this channel.
publicabstract long write (ByteBuffer srcs, int offset, int length) throws IOException [Specified in GatheringByteChannel]
  Writes a datagram to this channel.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar