From d62f8f8dc77223ebe8623163b7e8bf818f49f037 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 11 Feb 2003 06:48:53 +0000 Subject: 2003-02-11 Michael Koch * java/nio/channels/DatagramChannel.java (write): Throws IOException. (connect): Throws IOException. (disconnect): Throws IOException. (read): Throws IOException. (receive): Throws IOException. (send): Throws IOException. * java/nio/channels/Pipe.java (open): Throws IOException. * java/nio/channels/SelectableChannel.java (configureBlocking): Throws IOException. * java/nio/channels/ServerSocketChannel.java (accept): Throws IOException. * java/nio/channels/SocketChannel.java (SocketChannel): Implements ByteChannel, ScatteringByteChannel, GatheringByteChannel. (read): Throws IOException. (write): Throws IOException. (finishConnect): Throws IOException. * java/nio/channels/spi/AbstractInterruptibleChannel.java (end): Throws AsynchronousCloseException. * java/nio/channels/spi/AbstractSelectableChannel.java (configureBlocking): Throws IOException. (implCloseChannel): Throws IOException. (implCloseSelectableChannel): Throws IOException. (implConfigureBlocking): Throws IOException. * java/nio/channels/spi/SelectorProvider.java (openDatagramChannel): Throws IOException. (openPipe): Throws IOException. (openSelector): Throws IOException. (openServerSocketChannel): Throws IOException. (openSocketChannel): Throws IOException. From-SVN: r62682 --- libjava/java/nio/channels/SocketChannel.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libjava/java/nio/channels/SocketChannel.java') diff --git a/libjava/java/nio/channels/SocketChannel.java b/libjava/java/nio/channels/SocketChannel.java index 368a8ee..c22eb1d 100644 --- a/libjava/java/nio/channels/SocketChannel.java +++ b/libjava/java/nio/channels/SocketChannel.java @@ -49,6 +49,7 @@ import java.net.SocketAddress; * @since 1.4 */ abstract public class SocketChannel extends AbstractSelectableChannel + implements ByteChannel, ScatteringByteChannel, GatheringByteChannel { /** * Initializes this socket. @@ -100,7 +101,7 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception IOException If an error occurs * @exception NotYetConnectedException If this channel is not yet connected. */ - public final long read (ByteBuffer[] dsts) + public final long read (ByteBuffer[] dsts) throws IOException { long b = 0; @@ -118,7 +119,7 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception IOException If an error occurs * @exception NotYetConnectedException If this channel is not yet connected. */ - public final long write (ByteBuffer[] dsts) + public final long write (ByteBuffer[] dsts) throws IOException { long b = 0; @@ -144,7 +145,7 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception IOException If an error occurs * @exception NotYetConnectedException If this channel is not yet connected. */ - public abstract int read (ByteBuffer dst); + public abstract int read (ByteBuffer dst) throws IOException; /** * Connects the channel's socket to the remote address. @@ -179,7 +180,7 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception NoConnectionPendingException If this channel is not connected * and a connection operation has not been initiated. */ - public abstract boolean finishConnect (); + public abstract boolean finishConnect () throws IOException; /** * Tells whether or not the channel's socket is connected. @@ -197,7 +198,8 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception IOException If an error occurs * @exception NotYetConnectedException If this channel is not yet connected. */ - public abstract long read (ByteBuffer[] dsts, int offset, int length); + public abstract long read (ByteBuffer[] dsts, int offset, int length) + throws IOException; /** * Retrieves the channel's socket. @@ -210,7 +212,7 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception IOException If an error occurs * @exception NotYetConnectedException If this channel is not yet connected. */ - public abstract int write (ByteBuffer src); + public abstract int write (ByteBuffer src) throws IOException; /** * Writes data to the channel. @@ -218,5 +220,6 @@ abstract public class SocketChannel extends AbstractSelectableChannel * @exception IOException If an error occurs * @exception NotYetConnectedException If this channel is not yet connected. */ - public abstract long write (ByteBuffer[] srcs, int offset, int length); + public abstract long write (ByteBuffer[] srcs, int offset, int length) + throws IOException; } -- cgit v1.1