< prev index next >

src/java.base/share/classes/java/net/DatagramSocketImpl.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

*** 68,98 **** return 0; } /** * Creates a datagram socket. ! * @exception SocketException if there is an error in the * underlying protocol, such as a TCP error. */ protected abstract void create() throws SocketException; /** * Binds a datagram socket to a local port and address. * @param lport the local port * @param laddr the local address ! * @exception SocketException if there is an error in the * underlying protocol, such as a TCP error. */ protected abstract void bind(int lport, InetAddress laddr) throws SocketException; /** * Sends a datagram packet. The packet contains the data and the * destination address to send the packet to. * @param p the packet to be sent. ! * @exception IOException if an I/O exception occurs while sending the * datagram packet. ! * @exception PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that * the exception will be thrown. */ protected abstract void send(DatagramPacket p) throws IOException; --- 68,98 ---- return 0; } /** * Creates a datagram socket. ! * @throws SocketException if there is an error in the * underlying protocol, such as a TCP error. */ protected abstract void create() throws SocketException; /** * Binds a datagram socket to a local port and address. * @param lport the local port * @param laddr the local address ! * @throws SocketException if there is an error in the * underlying protocol, such as a TCP error. */ protected abstract void bind(int lport, InetAddress laddr) throws SocketException; /** * Sends a datagram packet. The packet contains the data and the * destination address to send the packet to. * @param p the packet to be sent. ! * @throws IOException if an I/O exception occurs while sending the * datagram packet. ! * @throws PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that * the exception will be thrown. */ protected abstract void send(DatagramPacket p) throws IOException;
*** 107,117 **** * packet has been received for that address, then a subsequent call to * send or receive may throw a PortUnreachableException. * Note, there is no guarantee that the exception will be thrown. * @param address the remote InetAddress to connect to * @param port the remote port number ! * @exception SocketException may be thrown if the socket cannot be * connected to the remote destination * @since 1.4 */ protected void connect(InetAddress address, int port) throws SocketException {} --- 107,117 ---- * packet has been received for that address, then a subsequent call to * send or receive may throw a PortUnreachableException. * Note, there is no guarantee that the exception will be thrown. * @param address the remote InetAddress to connect to * @param port the remote port number ! * @throws SocketException may be thrown if the socket cannot be * connected to the remote destination * @since 1.4 */ protected void connect(InetAddress address, int port) throws SocketException {}
*** 124,135 **** /** * Peek at the packet to see who it is from. Updates the specified {@code InetAddress} * to the address which the packet came from. * @param i an InetAddress object * @return the port number which the packet came from. ! * @exception IOException if an I/O exception occurs ! * @exception PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that the * exception will be thrown. */ protected abstract int peek(InetAddress i) throws IOException; --- 124,135 ---- /** * Peek at the packet to see who it is from. Updates the specified {@code InetAddress} * to the address which the packet came from. * @param i an InetAddress object * @return the port number which the packet came from. ! * @throws IOException if an I/O exception occurs ! * @throws PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that the * exception will be thrown. */ protected abstract int peek(InetAddress i) throws IOException;
*** 138,181 **** * {@code DatagramPacket}. The data is returned, * but not consumed, so that a subsequent peekData/receive operation * will see the same data. * @param p the Packet Received. * @return the port number which the packet came from. ! * @exception IOException if an I/O exception occurs ! * @exception PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that the * exception will be thrown. * @since 1.4 */ protected abstract int peekData(DatagramPacket p) throws IOException; /** * Receive the datagram packet. * @param p the Packet Received. ! * @exception IOException if an I/O exception occurs * while receiving the datagram packet. ! * @exception PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that the * exception will be thrown. */ protected abstract void receive(DatagramPacket p) throws IOException; /** * Set the TTL (time-to-live) option. * @param ttl a byte specifying the TTL value * * @deprecated use setTimeToLive instead. ! * @exception IOException if an I/O exception occurs while setting * the time-to-live option. * @see #getTTL() */ @Deprecated protected abstract void setTTL(byte ttl) throws IOException; /** * Retrieve the TTL (time-to-live) option. * ! * @exception IOException if an I/O exception occurs * while retrieving the time-to-live option * @deprecated use getTimeToLive instead. * @return a byte representing the TTL value * @see #setTTL(byte) */ --- 138,181 ---- * {@code DatagramPacket}. The data is returned, * but not consumed, so that a subsequent peekData/receive operation * will see the same data. * @param p the Packet Received. * @return the port number which the packet came from. ! * @throws IOException if an I/O exception occurs ! * @throws PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that the * exception will be thrown. * @since 1.4 */ protected abstract int peekData(DatagramPacket p) throws IOException; /** * Receive the datagram packet. * @param p the Packet Received. ! * @throws IOException if an I/O exception occurs * while receiving the datagram packet. ! * @throws PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no guarantee that the * exception will be thrown. */ protected abstract void receive(DatagramPacket p) throws IOException; /** * Set the TTL (time-to-live) option. * @param ttl a byte specifying the TTL value * * @deprecated use setTimeToLive instead. ! * @throws IOException if an I/O exception occurs while setting * the time-to-live option. * @see #getTTL() */ @Deprecated protected abstract void setTTL(byte ttl) throws IOException; /** * Retrieve the TTL (time-to-live) option. * ! * @throws IOException if an I/O exception occurs * while retrieving the time-to-live option * @deprecated use getTimeToLive instead. * @return a byte representing the TTL value * @see #setTTL(byte) */
*** 183,219 **** protected abstract byte getTTL() throws IOException; /** * Set the TTL (time-to-live) option. * @param ttl an {@code int} specifying the time-to-live value ! * @exception IOException if an I/O exception occurs * while setting the time-to-live option. * @see #getTimeToLive() */ protected abstract void setTimeToLive(int ttl) throws IOException; /** * Retrieve the TTL (time-to-live) option. ! * @exception IOException if an I/O exception occurs * while retrieving the time-to-live option * @return an {@code int} representing the time-to-live value * @see #setTimeToLive(int) */ protected abstract int getTimeToLive() throws IOException; /** * Join the multicast group. * @param inetaddr multicast address to join. ! * @exception IOException if an I/O exception occurs * while joining the multicast group. */ protected abstract void join(InetAddress inetaddr) throws IOException; /** * Leave the multicast group. * @param inetaddr multicast address to leave. ! * @exception IOException if an I/O exception occurs * while leaving the multicast group. */ protected abstract void leave(InetAddress inetaddr) throws IOException; /** --- 183,219 ---- protected abstract byte getTTL() throws IOException; /** * Set the TTL (time-to-live) option. * @param ttl an {@code int} specifying the time-to-live value ! * @throws IOException if an I/O exception occurs * while setting the time-to-live option. * @see #getTimeToLive() */ protected abstract void setTimeToLive(int ttl) throws IOException; /** * Retrieve the TTL (time-to-live) option. ! * @throws IOException if an I/O exception occurs * while retrieving the time-to-live option * @return an {@code int} representing the time-to-live value * @see #setTimeToLive(int) */ protected abstract int getTimeToLive() throws IOException; /** * Join the multicast group. * @param inetaddr multicast address to join. ! * @throws IOException if an I/O exception occurs * while joining the multicast group. */ protected abstract void join(InetAddress inetaddr) throws IOException; /** * Leave the multicast group. * @param inetaddr multicast address to leave. ! * @throws IOException if an I/O exception occurs * while leaving the multicast group. */ protected abstract void leave(InetAddress inetaddr) throws IOException; /**
< prev index next >