summaryrefslogtreecommitdiffstats
path: root/libjava/java/nio/channels/SocketChannel.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-29 12:32:17 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-29 12:32:17 +0000
commite79d3dfa3ef7eb66e7793e16bde70551b137a8ef (patch)
treeb6da5e421503ff5c05fe03d56a17a3b7d2275ea6 /libjava/java/nio/channels/SocketChannel.java
parentd50299082035ea2e1c8c1a44b4779fe5152a082b (diff)
downloadppe42-gcc-e79d3dfa3ef7eb66e7793e16bde70551b137a8ef.tar.gz
ppe42-gcc-e79d3dfa3ef7eb66e7793e16bde70551b137a8ef.zip
2002-11-29 Michael Koch <konqueror@gmx.de>
* java/nio/channels/DatagramChannel.java (open): Added exception documentation. (write): Added exception documentation. (connect): Added exception documentation. (disconnect): Added exception documentation. (isConnected): Added exception documentation. (read): Added exception documentation. (receive): Added exception documentation. (send): Added exception documentation. (validOps): Added exception documentation. * java/nio/channels/SocketChannel.java (open): Added exception documentation. (read): Added exception documentation. (write): Added exception documentation. (connect): Added exception documentation. (finishConnect): Added exception documentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59633 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/nio/channels/SocketChannel.java')
-rw-r--r--libjava/java/nio/channels/SocketChannel.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/libjava/java/nio/channels/SocketChannel.java b/libjava/java/nio/channels/SocketChannel.java
index 1d93430947e..368a8ee468c 100644
--- a/libjava/java/nio/channels/SocketChannel.java
+++ b/libjava/java/nio/channels/SocketChannel.java
@@ -60,6 +60,8 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Opens a socket channel.
+ *
+ * @exception IOException If an error occurs
*/
public static SocketChannel open () throws IOException
{
@@ -68,6 +70,18 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Opens a channel and connects it to a remote address.
+ *
+ * @exception AsynchronousCloseException If this channel is already connected.
+ * @exception ClosedByInterruptException If another thread interrupts the
+ * current thread while the connect operation is in progress, thereby closing
+ * the channel and setting the current thread's interrupt status.
+ * @exception IOException If an error occurs
+ * @exception SecurityException If a security manager has been installed and
+ * it does not permit access to the given remote endpoint.
+ * @exception UnresolvedAddressException If the given remote address is not
+ * fully resolved.
+ * @exception UnsupportedAddressTypeException If the type of the given remote
+ * address is not supported.
*/
public static SocketChannel open (SocketAddress remote) throws IOException
{
@@ -82,6 +96,9 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Reads data from the channel.
+ *
+ * @exception IOException If an error occurs
+ * @exception NotYetConnectedException If this channel is not yet connected.
*/
public final long read (ByteBuffer[] dsts)
{
@@ -97,6 +114,9 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Writes data to the channel.
+ *
+ * @exception IOException If an error occurs
+ * @exception NotYetConnectedException If this channel is not yet connected.
*/
public final long write (ByteBuffer[] dsts)
{
@@ -120,16 +140,44 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Reads data from the channel.
+ *
+ * @exception IOException If an error occurs
+ * @exception NotYetConnectedException If this channel is not yet connected.
*/
public abstract int read (ByteBuffer dst);
/**
* Connects the channel's socket to the remote address.
+ *
+ * @exception AlreadyConnectedException If this channel is already connected.
+ * @exception AsynchronousCloseException If this channel is already connected.
+ * @exception ClosedByInterruptException If another thread interrupts the
+ * current thread while the connect operation is in progress, thereby closing
+ * the channel and setting the current thread's interrupt status.
+ * @exception ClosedChannelException If this channel is closed.
+ * @exception ConnectionPendingException If a non-blocking connection
+ * operation is already in progress on this channel.
+ * @exception IOException If an error occurs
+ * @exception SecurityException If a security manager has been installed and
+ * it does not permit access to the given remote endpoint.
+ * @exception UnresolvedAddressException If the given remote address is not
+ * fully resolved.
+ * @exception UnsupportedAddressTypeException If the type of the given remote
+ * address is not supported.
*/
public abstract boolean connect (SocketAddress remote) throws IOException;
/**
* Finishes the process of connecting a socket channel.
+ *
+ * @exception AsynchronousCloseException If this channel is already connected.
+ * @exception ClosedByInterruptException If another thread interrupts the
+ * current thread while the connect operation is in progress, thereby closing
+ * the channel and setting the current thread's interrupt status.
+ * @exception ClosedChannelException If this channel is closed.
+ * @exception IOException If an error occurs
+ * @exception NoConnectionPendingException If this channel is not connected
+ * and a connection operation has not been initiated.
*/
public abstract boolean finishConnect ();
@@ -145,6 +193,9 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Reads data from the channel.
+ *
+ * @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);
@@ -155,11 +206,17 @@ abstract public class SocketChannel extends AbstractSelectableChannel
/**
* Writes data to the channel.
+ *
+ * @exception IOException If an error occurs
+ * @exception NotYetConnectedException If this channel is not yet connected.
*/
public abstract int write (ByteBuffer src);
/**
* Writes data to the channel.
+ *
+ * @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);
}
OpenPOWER on IntegriCloud