< prev index next >
src/java.base/share/classes/java/net/SocketImpl.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -112,31 +112,31 @@
/**
* Creates either a stream or a datagram socket.
*
* @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
- * @exception IOException if an I/O error occurs while creating the
+ * @throws IOException if an I/O error occurs while creating the
* socket.
*/
protected abstract void create(boolean stream) throws IOException;
/**
* Connects this socket to the specified port on the named host.
*
* @param host the name of the remote host.
* @param port the port number.
- * @exception IOException if an I/O error occurs when connecting to the
+ * @throws IOException if an I/O error occurs when connecting to the
* remote host.
*/
protected abstract void connect(String host, int port) throws IOException;
/**
* Connects this socket to the specified port number on the specified host.
*
* @param address the IP address of the remote host.
* @param port the port number.
- * @exception IOException if an I/O error occurs when attempting a
+ * @throws IOException if an I/O error occurs when attempting a
* connection.
*/
protected abstract void connect(InetAddress address, int port) throws IOException;
/**
@@ -144,78 +144,78 @@
* A timeout of zero is interpreted as an infinite timeout. The connection
* will then block until established or an error occurs.
*
* @param address the Socket address of the remote host.
* @param timeout the timeout value, in milliseconds, or zero for no timeout.
- * @exception IOException if an I/O error occurs when attempting a
+ * @throws IOException if an I/O error occurs when attempting a
* connection.
* @since 1.4
*/
protected abstract void connect(SocketAddress address, int timeout) throws IOException;
/**
* Binds this socket to the specified local IP address and port number.
*
* @param host an IP address that belongs to a local interface.
* @param port the port number.
- * @exception IOException if an I/O error occurs when binding this socket.
+ * @throws IOException if an I/O error occurs when binding this socket.
*/
protected abstract void bind(InetAddress host, int port) throws IOException;
/**
* Sets the maximum queue length for incoming connection indications
* (a request to connect) to the {@code count} argument. If a
* connection indication arrives when the queue is full, the
* connection is refused.
*
* @param backlog the maximum length of the queue.
- * @exception IOException if an I/O error occurs when creating the queue.
+ * @throws IOException if an I/O error occurs when creating the queue.
*/
protected abstract void listen(int backlog) throws IOException;
/**
* Accepts a connection.
*
* @param s the accepted connection.
- * @exception IOException if an I/O error occurs when accepting the
+ * @throws IOException if an I/O error occurs when accepting the
* connection.
*/
protected abstract void accept(SocketImpl s) throws IOException;
/**
* Returns an input stream for this socket.
*
* @return a stream for reading from this socket.
- * @exception IOException if an I/O error occurs when creating the
+ * @throws IOException if an I/O error occurs when creating the
* input stream.
*/
protected abstract InputStream getInputStream() throws IOException;
/**
* Returns an output stream for this socket.
*
* @return an output stream for writing to this socket.
- * @exception IOException if an I/O error occurs when creating the
+ * @throws IOException if an I/O error occurs when creating the
* output stream.
*/
protected abstract OutputStream getOutputStream() throws IOException;
/**
* Returns the number of bytes that can be read from this socket
* without blocking.
*
* @return the number of bytes that can be read from this socket
* without blocking.
- * @exception IOException if an I/O error occurs when determining the
+ * @throws IOException if an I/O error occurs when determining the
* number of bytes available.
*/
protected abstract int available() throws IOException;
/**
* Closes this socket.
*
- * @exception IOException if an I/O error occurs when closing this socket.
+ * @throws IOException if an I/O error occurs when closing this socket.
*/
protected abstract void close() throws IOException;
/**
* Closes this socket, ignoring any IOException that is thrown by close.
@@ -233,11 +233,11 @@
*
* If you read from a socket input stream after invoking this method on the
* socket, the stream's {@code available} method will return 0, and its
* {@code read} methods will return {@code -1} (end of stream).
*
- * @exception IOException if an I/O error occurs when shutting down this
+ * @throws IOException if an I/O error occurs when shutting down this
* socket.
* @see java.net.Socket#shutdownOutput()
* @see java.net.Socket#close()
* @see java.net.Socket#setSoLinger(boolean, int)
* @since 1.3
@@ -253,11 +253,11 @@
*
* If you write to a socket output stream after invoking
* shutdownOutput() on the socket, the stream will throw
* an IOException.
*
- * @exception IOException if an I/O error occurs when shutting down this
+ * @throws IOException if an I/O error occurs when shutting down this
* socket.
* @see java.net.Socket#shutdownInput()
* @see java.net.Socket#close()
* @see java.net.Socket#setSoLinger(boolean, int)
* @since 1.3
@@ -311,11 +311,11 @@
/**
* Send one byte of urgent data on the socket.
* The byte to be sent is the low eight bits of the parameter
* @param data The byte of data to send
- * @exception IOException if there is an error
+ * @throws IOException if there is an error
* sending the data.
* @since 1.4
*/
protected abstract void sendUrgentData (int data) throws IOException;
< prev index next >