aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/channels/DatagramChannel.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/nio/channels/DatagramChannel.java')
-rw-r--r--libjava/java/nio/channels/DatagramChannel.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/libjava/java/nio/channels/DatagramChannel.java b/libjava/java/nio/channels/DatagramChannel.java
index 6c457557b95..4a7ac9825f7 100644
--- a/libjava/java/nio/channels/DatagramChannel.java
+++ b/libjava/java/nio/channels/DatagramChannel.java
@@ -88,7 +88,7 @@ public abstract class DatagramChannel
* @exception IOException If an error occurs
* @exception NotYetConnectedException The channel's socket is not connected.
*/
- public final long write (ByteBuffer[] srcs)
+ public final long write (ByteBuffer[] srcs) throws IOException
{
long b = 0;
@@ -111,14 +111,15 @@ public abstract class DatagramChannel
* @exception SecurityException If a security manager has been installed and
* it does not permit datagrams to be sent to the given address.
*/
- public abstract DatagramChannel connect (SocketAddress remote);
+ public abstract DatagramChannel connect (SocketAddress remote)
+ throws IOException;
/**
* Disonnects this channel's socket.
*
* @exception IOException If an error occurs
*/
- public abstract DatagramChannel disconnect ();
+ public abstract DatagramChannel disconnect () throws IOException;
/**
* Tells whether or not this channel's socket is connected.
@@ -131,7 +132,7 @@ public abstract class DatagramChannel
/**
* Reads data from this channel.
*/
- public abstract int read (ByteBuffer dst);
+ public abstract int read (ByteBuffer dst) throws IOException;
/**
* Reads data from this channel.
@@ -139,7 +140,8 @@ public abstract class DatagramChannel
* @exception IOException If an error occurs.
* @exception NotYetConnectedException The channel's socket is not connected.
*/
- public abstract long read (ByteBuffer[] dsts, int offset, int length);
+ public abstract long read (ByteBuffer[] dsts, int offset, int length)
+ throws IOException;
/**
* Receives a datagram via this channel.
@@ -154,7 +156,7 @@ public abstract class DatagramChannel
* @exception SecurityException If a security manager has been installed and
* it does not permit datagrams to be sent to the given address.
*/
- public abstract SocketAddress receive (ByteBuffer dst);
+ public abstract SocketAddress receive (ByteBuffer dst) throws IOException;
/**
* Sends a datagram via this channel.
@@ -169,7 +171,8 @@ public abstract class DatagramChannel
* @exception SecurityException If a security manager has been installed and
* it does not permit datagrams to be sent to the given address.
*/
- public abstract int send (ByteBuffer src, SocketAddress target);
+ public abstract int send (ByteBuffer src, SocketAddress target)
+ throws IOException;
/**
* Retrieves the channel's socket.
@@ -182,7 +185,7 @@ public abstract class DatagramChannel
* @exception IOException If an error occurs.
* @exception NotYetConnectedException The channel's socket is not connected.
*/
- public abstract int write (ByteBuffer src);
+ public abstract int write (ByteBuffer src) throws IOException;
/**
* Writes data to this channel.
@@ -190,7 +193,8 @@ public abstract class DatagramChannel
* @exception IOException If an error occurs.
* @exception NotYetConnectedException The channel's socket is not connected.
*/
- public abstract long write (ByteBuffer[] srcs, int offset, int length);
+ public abstract long write (ByteBuffer[] srcs, int offset, int length)
+ throws IOException;
/**
* Retrieves the valid operations for this channel.