mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8230648: Replace @exception tag with @throws in java.base
Minor coding style update of javadoc tag in any file in java.base Reviewed-by: prappo, lancea
This commit is contained in:
parent
2fc6c6459d
commit
b15b322cf3
196 changed files with 1959 additions and 1962 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -90,7 +90,7 @@ public abstract class ContentHandler {
|
|||
*
|
||||
* @param urlc a URL connection.
|
||||
* @return the object read by the {@code ContentHandler}.
|
||||
* @exception IOException if an I/O error occurs while reading the object.
|
||||
* @throws IOException if an I/O error occurs while reading the object.
|
||||
*/
|
||||
public abstract Object getContent(URLConnection urlc) throws IOException;
|
||||
|
||||
|
@ -108,7 +108,7 @@ public abstract class ContentHandler {
|
|||
* @return the object read by the {@code ContentHandler} that is
|
||||
* the first match of the suggested types or
|
||||
* {@code null} if none of the requested are supported.
|
||||
* @exception IOException if an I/O error occurs while reading the object.
|
||||
* @throws IOException if an I/O error occurs while reading the object.
|
||||
* @since 1.3
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
|
|
@ -245,7 +245,7 @@ class DatagramPacket {
|
|||
* @param length the length of the data
|
||||
* and/or the length of the buffer used to receive data
|
||||
*
|
||||
* @exception NullPointerException if the argument is null
|
||||
* @throws NullPointerException if the argument is null
|
||||
*
|
||||
* @see #getData
|
||||
* @see #getOffset
|
||||
|
@ -331,7 +331,7 @@ class DatagramPacket {
|
|||
*
|
||||
* @param buf the buffer to set for this packet.
|
||||
*
|
||||
* @exception NullPointerException if the argument is null.
|
||||
* @throws NullPointerException if the argument is null.
|
||||
*
|
||||
* @see #getLength
|
||||
* @see #getData
|
||||
|
@ -357,7 +357,7 @@ class DatagramPacket {
|
|||
*
|
||||
* @param length the length to set for this packet.
|
||||
*
|
||||
* @exception IllegalArgumentException if the length is negative
|
||||
* @throws IllegalArgumentException if the length is negative
|
||||
* of if the length is greater than the packet's data buffer
|
||||
* length.
|
||||
*
|
||||
|
|
|
@ -188,9 +188,9 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* with 0 as its argument to ensure the operation is allowed.
|
||||
* This could result in a SecurityException.
|
||||
*
|
||||
* @exception SocketException if the socket could not be opened,
|
||||
* @throws SocketException if the socket could not be opened,
|
||||
* or the socket could not bind to the specified local port.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
*
|
||||
* @see SecurityManager#checkListen
|
||||
|
@ -229,9 +229,9 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* @param bindaddr local socket address to bind, or {@code null}
|
||||
* for an unbound socket.
|
||||
*
|
||||
* @exception SocketException if the socket could not be opened,
|
||||
* @throws SocketException if the socket could not be opened,
|
||||
* or the socket could not bind to the specified local port.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
*
|
||||
* @see SecurityManager#checkListen
|
||||
|
@ -263,9 +263,9 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param port port to use.
|
||||
* @exception SocketException if the socket could not be opened,
|
||||
* @throws SocketException if the socket could not be opened,
|
||||
* or the socket could not bind to the specified local port.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
*
|
||||
* @see SecurityManager#checkListen
|
||||
|
@ -290,9 +290,9 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* @param port local port to use
|
||||
* @param laddr local address to bind
|
||||
*
|
||||
* @exception SocketException if the socket could not be opened,
|
||||
* @throws SocketException if the socket could not be opened,
|
||||
* or the socket could not bind to the specified local port.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
*
|
||||
* @see SecurityManager#checkListen
|
||||
|
@ -635,17 +635,17 @@ class DatagramSocket implements java.io.Closeable {
|
|||
*
|
||||
* @param p the {@code DatagramPacket} to be sent.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkMulticast} or {@code checkConnect}
|
||||
* method doesn't allow the send.
|
||||
* @exception PortUnreachableException may be thrown if the socket is connected
|
||||
* @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.
|
||||
* @exception java.nio.channels.IllegalBlockingModeException
|
||||
* @throws java.nio.channels.IllegalBlockingModeException
|
||||
* if this socket has an associated channel,
|
||||
* and the channel is in non-blocking mode.
|
||||
* @exception IllegalArgumentException if the socket is connected,
|
||||
* @throws IllegalArgumentException if the socket is connected,
|
||||
* and connected address and packet address differ.
|
||||
*
|
||||
* @see java.net.DatagramPacket
|
||||
|
@ -714,13 +714,13 @@ class DatagramSocket implements java.io.Closeable {
|
|||
*
|
||||
* @param p the {@code DatagramPacket} into which to place
|
||||
* the incoming data.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @exception SocketTimeoutException if setSoTimeout was previously called
|
||||
* @throws IOException if an I/O error occurs.
|
||||
* @throws SocketTimeoutException if setSoTimeout was previously called
|
||||
* and the timeout has expired.
|
||||
* @exception PortUnreachableException may be thrown if the socket is connected
|
||||
* @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.
|
||||
* @exception java.nio.channels.IllegalBlockingModeException
|
||||
* @throws java.nio.channels.IllegalBlockingModeException
|
||||
* if this socket has an associated channel,
|
||||
* and the channel is in non-blocking mode.
|
||||
* @see java.net.DatagramPacket
|
||||
|
@ -951,9 +951,9 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* @param size the size to which to set the send buffer
|
||||
* size. This value must be greater than 0.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as an UDP error.
|
||||
* @exception IllegalArgumentException if the value is 0 or is
|
||||
* @throws IllegalArgumentException if the value is 0 or is
|
||||
* negative.
|
||||
* @see #getSendBufferSize()
|
||||
*/
|
||||
|
@ -972,7 +972,7 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* buffer size used by the platform for output on this {@code DatagramSocket}.
|
||||
*
|
||||
* @return the value of the SO_SNDBUF option for this {@code DatagramSocket}
|
||||
* @exception SocketException if there is an error in
|
||||
* @throws SocketException if there is an error in
|
||||
* the underlying protocol, such as an UDP error.
|
||||
* @see #setSendBufferSize
|
||||
*/
|
||||
|
@ -1009,9 +1009,9 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* @param size the size to which to set the receive buffer
|
||||
* size. This value must be greater than 0.
|
||||
*
|
||||
* @exception SocketException if there is an error in
|
||||
* @throws SocketException if there is an error in
|
||||
* the underlying protocol, such as an UDP error.
|
||||
* @exception IllegalArgumentException if the value is 0 or is
|
||||
* @throws IllegalArgumentException if the value is 0 or is
|
||||
* negative.
|
||||
* @see #getReceiveBufferSize()
|
||||
*/
|
||||
|
@ -1030,7 +1030,7 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* buffer size used by the platform for input on this {@code DatagramSocket}.
|
||||
*
|
||||
* @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
|
||||
* @exception SocketException if there is an error in the underlying protocol, such as an UDP error.
|
||||
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
|
||||
* @see #setReceiveBufferSize(int)
|
||||
*/
|
||||
public synchronized int getReceiveBufferSize()
|
||||
|
@ -1070,7 +1070,7 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* is not defined.
|
||||
*
|
||||
* @param on whether to enable or disable the
|
||||
* @exception SocketException if an error occurs enabling or
|
||||
* @throws SocketException if an error occurs enabling or
|
||||
* disabling the {@code SO_REUSEADDR} socket option,
|
||||
* or the socket is closed.
|
||||
* @since 1.4
|
||||
|
@ -1093,7 +1093,7 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* Tests if SO_REUSEADDR is enabled.
|
||||
*
|
||||
* @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as an UDP error.
|
||||
* @since 1.4
|
||||
* @see #setReuseAddress(boolean)
|
||||
|
@ -1131,7 +1131,7 @@ class DatagramSocket implements java.io.Closeable {
|
|||
/**
|
||||
* Tests if SO_BROADCAST is enabled.
|
||||
* @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as an UDP error.
|
||||
* @since 1.4
|
||||
* @see #setBroadcast(boolean)
|
||||
|
@ -1290,10 +1290,10 @@ class DatagramSocket implements java.io.Closeable {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param fac the desired factory.
|
||||
* @exception IOException if an I/O error occurs when setting the
|
||||
* @throws IOException if an I/O error occurs when setting the
|
||||
* datagram socket factory.
|
||||
* @exception SocketException if the factory is already defined.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SocketException if the factory is already defined.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't allow the operation.
|
||||
* @see java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
|
||||
* @see SecurityManager#checkSetFactory
|
||||
|
|
|
@ -70,29 +70,29 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
|
||||
/**
|
||||
* Creates a datagram socket.
|
||||
* @exception SocketException if there is an error in the
|
||||
* @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
|
||||
* @exception SocketException if there is an error in the
|
||||
* underlying protocol, such as a TCP error.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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,11 +107,11 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
* 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
|
||||
* @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,12 +124,12 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
/**
|
||||
* 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.
|
||||
* @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,23 +138,23 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
* {@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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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;
|
||||
|
||||
|
@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
* @param ttl a byte specifying the TTL value
|
||||
*
|
||||
* @deprecated use setTimeToLive instead.
|
||||
* @exception IOException if an I/O exception occurs while setting
|
||||
* @throws IOException if an I/O exception occurs while setting
|
||||
* the time-to-live option.
|
||||
* @see #getTTL()
|
||||
*/
|
||||
|
@ -173,7 +173,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
/**
|
||||
* Retrieve the TTL (time-to-live) option.
|
||||
*
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* @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
|
||||
|
@ -185,7 +185,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
/**
|
||||
* 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
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while setting the time-to-live option.
|
||||
* @see #getTimeToLive()
|
||||
*/
|
||||
|
@ -193,7 +193,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
|
||||
/**
|
||||
* Retrieve the TTL (time-to-live) option.
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* @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)
|
||||
|
@ -203,7 +203,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
/**
|
||||
* Join the multicast group.
|
||||
* @param inetaddr multicast address to join.
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while joining the multicast group.
|
||||
*/
|
||||
protected abstract void join(InetAddress inetaddr) throws IOException;
|
||||
|
@ -211,7 +211,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
/**
|
||||
* Leave the multicast group.
|
||||
* @param inetaddr multicast address to leave.
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while leaving the multicast group.
|
||||
*/
|
||||
protected abstract void leave(InetAddress inetaddr) throws IOException;
|
||||
|
@ -272,9 +272,9 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
* UnsupportedOperationException}. Subclasses should override this method
|
||||
* with an appropriate implementation.
|
||||
*
|
||||
* @param <T> The type of the socket option value
|
||||
* @param name The socket option
|
||||
* @param value The value of the socket option. A value of {@code null}
|
||||
* @param <T> The type of the socket option value
|
||||
* @param name The socket option
|
||||
* @param value The value of the socket option. A value of {@code null}
|
||||
* may be valid for some options.
|
||||
*
|
||||
* @throws UnsupportedOperationException if the DatagramSocketImpl does not
|
||||
|
@ -300,8 +300,8 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
|||
* UnsupportedOperationException}. Subclasses should override this method
|
||||
* with an appropriate implementation.
|
||||
*
|
||||
* @param <T> The type of the socket option value
|
||||
* @param name The socket option
|
||||
* @param <T> The type of the socket option value
|
||||
* @param name The socket option
|
||||
* @return the socket option
|
||||
*
|
||||
* @throws UnsupportedOperationException if the DatagramSocketImpl does not
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -381,7 +381,7 @@ public abstract class HttpURLConnection extends URLConnection {
|
|||
*
|
||||
* @param set a {@code boolean} indicating whether or not
|
||||
* to follow HTTP redirects.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't
|
||||
* allow the operation.
|
||||
* @see SecurityManager#checkSetFactory
|
||||
|
@ -456,9 +456,9 @@ public abstract class HttpURLConnection extends URLConnection {
|
|||
* method is GET.
|
||||
*
|
||||
* @param method the HTTP method
|
||||
* @exception ProtocolException if the method cannot be reset or if
|
||||
* @throws ProtocolException if the method cannot be reset or if
|
||||
* the requested method isn't valid for HTTP.
|
||||
* @exception SecurityException if a security manager is set and the
|
||||
* @throws SecurityException if a security manager is set and the
|
||||
* method is "TRACE", but the "allowHttpTrace"
|
||||
* NetPermission is not granted.
|
||||
* @see #getRequestMethod()
|
||||
|
@ -627,7 +627,7 @@ public abstract class HttpURLConnection extends URLConnection {
|
|||
* Returns a {@link SocketPermission} object representing the
|
||||
* permission necessary to connect to the destination host and port.
|
||||
*
|
||||
* @exception IOException if an error occurs while computing
|
||||
* @throws IOException if an error occurs while computing
|
||||
* the permission.
|
||||
*
|
||||
* @return a {@code SocketPermission} object representing the
|
||||
|
|
|
@ -1161,7 +1161,7 @@ class InetAddress implements java.io.Serializable {
|
|||
* @param host the specified host
|
||||
* @param addr the raw IP address in network byte order
|
||||
* @return an InetAddress object created from the raw IP address.
|
||||
* @exception UnknownHostException if IP address is of illegal length
|
||||
* @throws UnknownHostException if IP address is of illegal length
|
||||
* @since 1.4
|
||||
*/
|
||||
public static InetAddress getByAddress(String host, byte[] addr)
|
||||
|
@ -1216,10 +1216,10 @@ class InetAddress implements java.io.Serializable {
|
|||
*
|
||||
* @param host the specified host, or {@code null}.
|
||||
* @return an IP address for the given host name.
|
||||
* @exception UnknownHostException if no IP address for the
|
||||
* @throws UnknownHostException if no IP address for the
|
||||
* {@code host} could be found, or if a scope_id was specified
|
||||
* for a global IPv6 address.
|
||||
* @exception SecurityException if a security manager exists
|
||||
* @throws SecurityException if a security manager exists
|
||||
* and its checkConnect method doesn't allow the operation
|
||||
*/
|
||||
public static InetAddress getByName(String host)
|
||||
|
@ -1264,10 +1264,10 @@ class InetAddress implements java.io.Serializable {
|
|||
* @param host the name of the host, or {@code null}.
|
||||
* @return an array of all the IP addresses for a given host name.
|
||||
*
|
||||
* @exception UnknownHostException if no IP address for the
|
||||
* @throws UnknownHostException if no IP address for the
|
||||
* {@code host} could be found, or if a scope_id was specified
|
||||
* for a global IPv6 address.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the operation.
|
||||
*
|
||||
* @see SecurityManager#checkConnect
|
||||
|
@ -1542,7 +1542,7 @@ class InetAddress implements java.io.Serializable {
|
|||
*
|
||||
* @param addr the raw IP address in network byte order
|
||||
* @return an InetAddress object created from the raw IP address.
|
||||
* @exception UnknownHostException if IP address is of illegal length
|
||||
* @throws UnknownHostException if IP address is of illegal length
|
||||
* @since 1.4
|
||||
*/
|
||||
public static InetAddress getByAddress(byte[] addr)
|
||||
|
@ -1580,7 +1580,7 @@ class InetAddress implements java.io.Serializable {
|
|||
*
|
||||
* @return the address of the local host.
|
||||
*
|
||||
* @exception UnknownHostException if the local host name could not
|
||||
* @throws UnknownHostException if the local host name could not
|
||||
* be resolved into an address.
|
||||
*
|
||||
* @see SecurityManager#checkConnect
|
||||
|
|
|
@ -217,7 +217,7 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
* a connection to an entry of a JAR file, the JAR file object is
|
||||
* returned
|
||||
*
|
||||
* @exception IOException if an IOException occurs while trying to
|
||||
* @throws IOException if an IOException occurs while trying to
|
||||
* connect to the JAR file for this connection.
|
||||
*
|
||||
* @see #connect
|
||||
|
@ -230,7 +230,7 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
* @return the manifest object corresponding to the JAR file object
|
||||
* for this connection.
|
||||
*
|
||||
* @exception IOException if getting the JAR file for this
|
||||
* @throws IOException if getting the JAR file for this
|
||||
* connection causes an IOException to be thrown.
|
||||
*
|
||||
* @see #getJarFile
|
||||
|
@ -247,7 +247,7 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
* @return the JAR entry object for this connection, or null if
|
||||
* the JAR URL for this connection points to a JAR file.
|
||||
*
|
||||
* @exception IOException if getting the JAR file for this
|
||||
* @throws IOException if getting the JAR file for this
|
||||
* connection causes an IOException to be thrown.
|
||||
*
|
||||
* @see #getJarFile
|
||||
|
@ -264,7 +264,7 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
* @return the Attributes object for this connection if the URL
|
||||
* for it points to a JAR file entry, null otherwise.
|
||||
*
|
||||
* @exception IOException if getting the JAR entry causes an
|
||||
* @throws IOException if getting the JAR entry causes an
|
||||
* IOException to be thrown.
|
||||
*
|
||||
* @see #getJarEntry
|
||||
|
@ -281,7 +281,7 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
* @return the main Attributes for the JAR file for this
|
||||
* connection.
|
||||
*
|
||||
* @exception IOException if getting the manifest causes an
|
||||
* @throws IOException if getting the manifest causes an
|
||||
* IOException to be thrown.
|
||||
*
|
||||
* @see #getJarFile
|
||||
|
@ -303,7 +303,7 @@ public abstract class JarURLConnection extends URLConnection {
|
|||
* @return the Certificate object for this connection if the URL
|
||||
* for it points to a JAR file entry, null otherwise.
|
||||
*
|
||||
* @exception IOException if getting the JAR entry causes an
|
||||
* @throws IOException if getting the JAR entry causes an
|
||||
* IOException to be thrown.
|
||||
*
|
||||
* @see #getJarEntry
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -103,9 +103,9 @@ class MulticastSocket extends DatagramSocket {
|
|||
* {@link DatagramSocket#setReuseAddress(boolean)} method is called to
|
||||
* enable the SO_REUSEADDR socket option.
|
||||
*
|
||||
* @exception IOException if an I/O exception occurs while creating the
|
||||
* @throws IOException if an I/O exception occurs while creating the
|
||||
* MulticastSocket
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
* @see SecurityManager#checkListen
|
||||
* @see java.net.DatagramSocket#setReuseAddress(boolean)
|
||||
|
@ -128,13 +128,13 @@ class MulticastSocket extends DatagramSocket {
|
|||
* {@link DatagramSocket#setReuseAddress(boolean)} method is
|
||||
* called to enable the SO_REUSEADDR socket option.
|
||||
*
|
||||
* @param port port to use
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* while creating the MulticastSocket
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
* @see SecurityManager#checkListen
|
||||
* @see java.net.DatagramSocket#setReuseAddress(boolean)
|
||||
* @param port port to use
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while creating the MulticastSocket
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
* @see SecurityManager#checkListen
|
||||
* @see java.net.DatagramSocket#setReuseAddress(boolean)
|
||||
*/
|
||||
public MulticastSocket(int port) throws IOException {
|
||||
this(new InetSocketAddress(port));
|
||||
|
@ -154,14 +154,14 @@ class MulticastSocket extends DatagramSocket {
|
|||
* {@link DatagramSocket#setReuseAddress(boolean)} method is
|
||||
* called to enable the SO_REUSEADDR socket option.
|
||||
*
|
||||
* @param bindaddr Socket address to bind to, or {@code null} for
|
||||
* an unbound socket.
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* while creating the MulticastSocket
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
* @see SecurityManager#checkListen
|
||||
* @see java.net.DatagramSocket#setReuseAddress(boolean)
|
||||
* @param bindaddr Socket address to bind to, or {@code null} for
|
||||
* an unbound socket.
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while creating the MulticastSocket
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkListen} method doesn't allow the operation.
|
||||
* @see SecurityManager#checkListen
|
||||
* @see java.net.DatagramSocket#setReuseAddress(boolean)
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
|
@ -208,11 +208,11 @@ class MulticastSocket extends DatagramSocket {
|
|||
* <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
|
||||
* in the range {@code 0 <= ttl <= 0xFF }.
|
||||
*
|
||||
* @param ttl the time-to-live
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* while setting the default time-to-live value
|
||||
* @param ttl the time-to-live
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while setting the default time-to-live value
|
||||
* @deprecated use the setTimeToLive method instead, which uses
|
||||
* <b>int</b> instead of <b>byte</b> as the type for ttl.
|
||||
* <b>int</b> instead of <b>byte</b> as the type for ttl.
|
||||
* @see #getTTL()
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -254,7 +254,7 @@ class MulticastSocket extends DatagramSocket {
|
|||
* Get the default time-to-live for multicast packets sent out on
|
||||
* the socket.
|
||||
*
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* while getting the default time-to-live value
|
||||
* @return the default time-to-live value
|
||||
* @deprecated use the getTimeToLive method instead, which returns
|
||||
|
@ -271,7 +271,7 @@ class MulticastSocket extends DatagramSocket {
|
|||
/**
|
||||
* Get the default time-to-live for multicast packets sent out on
|
||||
* the socket.
|
||||
* @exception IOException if an I/O exception occurs while
|
||||
* @throws IOException if an I/O exception occurs while
|
||||
* getting the default time-to-live value
|
||||
* @return the default time-to-live value
|
||||
* @see #setTimeToLive(int)
|
||||
|
@ -293,10 +293,10 @@ class MulticastSocket extends DatagramSocket {
|
|||
*
|
||||
* @param mcastaddr is the multicast address to join
|
||||
*
|
||||
* @exception IOException if there is an error joining, or when the address
|
||||
* @throws IOException if there is an error joining, or when the address
|
||||
* is not a multicast address, or the platform does not support
|
||||
* multicasting
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkMulticast} method doesn't allow the join.
|
||||
*
|
||||
* @see SecurityManager#checkMulticast(InetAddress)
|
||||
|
@ -339,9 +339,9 @@ class MulticastSocket extends DatagramSocket {
|
|||
* as its argument.
|
||||
*
|
||||
* @param mcastaddr is the multicast address to leave
|
||||
* @exception IOException if there is an error leaving
|
||||
* @throws IOException if there is an error leaving
|
||||
* or when the address is not a multicast address.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkMulticast} method doesn't allow the operation.
|
||||
*
|
||||
* @see SecurityManager#checkMulticast(InetAddress)
|
||||
|
@ -378,10 +378,10 @@ class MulticastSocket extends DatagramSocket {
|
|||
* {@link MulticastSocket#setInterface(InetAddress)} or
|
||||
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
|
||||
*
|
||||
* @exception IOException if there is an error joining, or when the address
|
||||
* @throws IOException if there is an error joining, or when the address
|
||||
* is not a multicast address, or the platform does not support
|
||||
* multicasting
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkMulticast} method doesn't allow the join.
|
||||
* @throws IllegalArgumentException if mcastaddr is null or is a
|
||||
* SocketAddress subclass not supported by this socket
|
||||
|
@ -426,9 +426,9 @@ class MulticastSocket extends DatagramSocket {
|
|||
* to the interface set by
|
||||
* {@link MulticastSocket#setInterface(InetAddress)} or
|
||||
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
|
||||
* @exception IOException if there is an error leaving
|
||||
* @throws IOException if there is an error leaving
|
||||
* or when the address is not a multicast address.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkMulticast} method doesn't allow the operation.
|
||||
* @throws IllegalArgumentException if mcastaddr is null or is a
|
||||
* SocketAddress subclass not supported by this socket
|
||||
|
@ -465,7 +465,7 @@ class MulticastSocket extends DatagramSocket {
|
|||
* whose behavior would be affected by the value of the
|
||||
* network interface. Useful for multihomed hosts.
|
||||
* @param inf the InetAddress
|
||||
* @exception SocketException if there is an error in
|
||||
* @throws SocketException if there is an error in
|
||||
* the underlying protocol, such as a TCP error.
|
||||
* @see #getInterface()
|
||||
*/
|
||||
|
@ -489,7 +489,7 @@ class MulticastSocket extends DatagramSocket {
|
|||
* the address of the network interface used for
|
||||
* multicast packets.
|
||||
*
|
||||
* @exception SocketException if there is an error in
|
||||
* @throws SocketException if there is an error in
|
||||
* the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @see #setInterface(java.net.InetAddress)
|
||||
|
@ -549,7 +549,7 @@ class MulticastSocket extends DatagramSocket {
|
|||
* sent on this socket.
|
||||
*
|
||||
* @param netIf the interface
|
||||
* @exception SocketException if there is an error in
|
||||
* @throws SocketException if there is an error in
|
||||
* the underlying protocol, such as a TCP error.
|
||||
* @see #getNetworkInterface()
|
||||
* @since 1.4
|
||||
|
@ -567,7 +567,7 @@ class MulticastSocket extends DatagramSocket {
|
|||
/**
|
||||
* Get the multicast network interface set.
|
||||
*
|
||||
* @exception SocketException if there is an error in
|
||||
* @throws SocketException if there is an error in
|
||||
* the underlying protocol, such as a TCP error.
|
||||
* @return the multicast {@code NetworkInterface} currently set
|
||||
* @see #setNetworkInterface(NetworkInterface)
|
||||
|
@ -643,9 +643,9 @@ class MulticastSocket extends DatagramSocket {
|
|||
* @param ttl optional time to live for multicast packet.
|
||||
* default ttl is 1.
|
||||
*
|
||||
* @exception IOException is raised if an error occurs i.e
|
||||
* @throws IOException is raised if an error occurs i.e
|
||||
* error while setting ttl.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkMulticast} or {@code checkConnect}
|
||||
* method doesn't allow the send.
|
||||
*
|
||||
|
|
|
@ -341,7 +341,7 @@ public final class NetworkInterface {
|
|||
* {@link #getInetAddresses()} to obtain all IP addresses for this node
|
||||
*
|
||||
* @return an Enumeration of NetworkInterfaces found on this machine
|
||||
* @exception SocketException if an I/O error occurs,
|
||||
* @throws SocketException if an I/O error occurs,
|
||||
* or if the platform does not have at least one configured
|
||||
* network interface.
|
||||
* @see #networkInterfaces()
|
||||
|
@ -371,7 +371,7 @@ public final class NetworkInterface {
|
|||
* }</pre>
|
||||
*
|
||||
* @return a Stream of NetworkInterfaces found on this machine
|
||||
* @exception SocketException if an I/O error occurs,
|
||||
* @throws SocketException if an I/O error occurs,
|
||||
* or if the platform does not have at least one configured
|
||||
* network interface.
|
||||
* @since 9
|
||||
|
@ -450,7 +450,7 @@ public final class NetworkInterface {
|
|||
* Returns whether a network interface is up and running.
|
||||
*
|
||||
* @return {@code true} if the interface is up and running.
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @throws SocketException if an I/O error occurs.
|
||||
* @since 1.6
|
||||
*/
|
||||
|
||||
|
@ -462,7 +462,7 @@ public final class NetworkInterface {
|
|||
* Returns whether a network interface is a loopback interface.
|
||||
*
|
||||
* @return {@code true} if the interface is a loopback interface.
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @throws SocketException if an I/O error occurs.
|
||||
* @since 1.6
|
||||
*/
|
||||
|
||||
|
@ -477,7 +477,7 @@ public final class NetworkInterface {
|
|||
*
|
||||
* @return {@code true} if the interface is a point to point
|
||||
* interface.
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @throws SocketException if an I/O error occurs.
|
||||
* @since 1.6
|
||||
*/
|
||||
|
||||
|
@ -489,7 +489,7 @@ public final class NetworkInterface {
|
|||
* Returns whether a network interface supports multicasting or not.
|
||||
*
|
||||
* @return {@code true} if the interface supports Multicasting.
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @throws SocketException if an I/O error occurs.
|
||||
* @since 1.6
|
||||
*/
|
||||
|
||||
|
@ -508,7 +508,7 @@ public final class NetworkInterface {
|
|||
* manager is set and the caller does not have the permission
|
||||
* NetPermission("getNetworkInformation")
|
||||
*
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @throws SocketException if an I/O error occurs.
|
||||
* @since 1.6
|
||||
*/
|
||||
public byte[] getHardwareAddress() throws SocketException {
|
||||
|
@ -535,7 +535,7 @@ public final class NetworkInterface {
|
|||
* Returns the Maximum Transmission Unit (MTU) of this interface.
|
||||
*
|
||||
* @return the value of the MTU for that interface.
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @throws SocketException if an I/O error occurs.
|
||||
* @since 1.6
|
||||
*/
|
||||
public int getMTU() throws SocketException {
|
||||
|
|
|
@ -85,10 +85,10 @@ public abstract class ProxySelector {
|
|||
*
|
||||
* @throws SecurityException
|
||||
* If a security manager has been installed and it denies
|
||||
* {@link NetPermission}{@code ("getProxySelector")}
|
||||
* @see #setDefault(ProxySelector)
|
||||
* @return the system-wide {@code ProxySelector}
|
||||
* @since 1.5
|
||||
* {@link NetPermission}{@code ("getProxySelector")}
|
||||
* @see #setDefault(ProxySelector)
|
||||
* @return the system-wide {@code ProxySelector}
|
||||
* @since 1.5
|
||||
*/
|
||||
public static ProxySelector getDefault() {
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
|
@ -108,7 +108,7 @@ public abstract class ProxySelector {
|
|||
*
|
||||
* @throws SecurityException
|
||||
* If a security manager has been installed and it denies
|
||||
* {@link NetPermission}{@code ("setProxySelector")}
|
||||
* {@link NetPermission}{@code ("setProxySelector")}
|
||||
*
|
||||
* @see #getDefault()
|
||||
* @since 1.5
|
||||
|
@ -163,7 +163,7 @@ public abstract class ProxySelector {
|
|||
*
|
||||
* @param ioe
|
||||
* The I/O exception thrown when the connect failed.
|
||||
* @throws IllegalArgumentException if either argument is null
|
||||
* @throws IllegalArgumentException if either argument is null
|
||||
*/
|
||||
public abstract void connectFailed(URI uri, SocketAddress sa, IOException ioe);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
/**
|
||||
* Creates an unbound server socket.
|
||||
*
|
||||
* @exception IOException IO error when opening the socket.
|
||||
* @throws IOException IO error when opening the socket.
|
||||
* @revised 1.4
|
||||
*/
|
||||
public ServerSocket() throws IOException {
|
||||
|
@ -115,11 +115,11 @@ class ServerSocket implements java.io.Closeable {
|
|||
* @param port the port number, or {@code 0} to use a port
|
||||
* number that is automatically allocated.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs when opening the socket.
|
||||
* @exception SecurityException
|
||||
* @throws IOException if an I/O error occurs when opening the socket.
|
||||
* @throws SecurityException
|
||||
* if a security manager exists and its {@code checkListen}
|
||||
* method doesn't allow the operation.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
*
|
||||
|
@ -168,11 +168,11 @@ class ServerSocket implements java.io.Closeable {
|
|||
* @param backlog requested maximum length of the queue of incoming
|
||||
* connections.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs when opening the socket.
|
||||
* @exception SecurityException
|
||||
* @throws IOException if an I/O error occurs when opening the socket.
|
||||
* @throws SecurityException
|
||||
* if a security manager exists and its {@code checkListen}
|
||||
* method doesn't allow the operation.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
*
|
||||
|
@ -221,7 +221,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
* its {@code checkListen} method doesn't allow the operation.
|
||||
*
|
||||
* @throws IOException if an I/O error occurs when opening the socket.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
*
|
||||
|
@ -474,13 +474,13 @@ class ServerSocket implements java.io.Closeable {
|
|||
* of the {@linkplain Socket#setSocketImplFactory(SocketImplFactory)
|
||||
* client socket implementation factory}, if one has been set.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs when waiting for a
|
||||
* @throws IOException if an I/O error occurs when waiting for a
|
||||
* connection.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkAccept} method doesn't allow the operation.
|
||||
* @exception SocketTimeoutException if a timeout was previously set with setSoTimeout and
|
||||
* @throws SocketTimeoutException if a timeout was previously set with setSoTimeout and
|
||||
* the timeout has been reached.
|
||||
* @exception java.nio.channels.IllegalBlockingModeException
|
||||
* @throws java.nio.channels.IllegalBlockingModeException
|
||||
* if this socket has an associated channel, the channel is in
|
||||
* non-blocking mode, and there is no connection ready to be
|
||||
* accepted
|
||||
|
@ -674,7 +674,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
* <p> If this socket has an associated channel then the channel is closed
|
||||
* as well.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs when closing the socket.
|
||||
* @throws IOException if an I/O error occurs when closing the socket.
|
||||
* @revised 1.4
|
||||
* @spec JSR-51
|
||||
*/
|
||||
|
@ -763,7 +763,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
* Retrieve setting for {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}.
|
||||
* 0 returns implies that the option is disabled (i.e., timeout of infinity).
|
||||
* @return the {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} value
|
||||
* @exception IOException if an I/O error occurs
|
||||
* @throws IOException if an I/O error occurs
|
||||
* @since 1.1
|
||||
* @see #setSoTimeout(int)
|
||||
*/
|
||||
|
@ -806,7 +806,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
* is not defined.
|
||||
*
|
||||
* @param on whether to enable or disable the socket option
|
||||
* @exception SocketException if an error occurs enabling or
|
||||
* @throws SocketException if an error occurs enabling or
|
||||
* disabling the {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
|
||||
* socket option, or the socket is closed.
|
||||
* @since 1.4
|
||||
|
@ -826,7 +826,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
*
|
||||
* @return a {@code boolean} indicating whether or not
|
||||
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.4
|
||||
* @see #setReuseAddress(boolean)
|
||||
|
@ -885,10 +885,10 @@ class ServerSocket implements java.io.Closeable {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param fac the desired factory.
|
||||
* @exception IOException if an I/O error occurs when setting the
|
||||
* @throws IOException if an I/O error occurs when setting the
|
||||
* socket factory.
|
||||
* @exception SocketException if the factory has already been defined.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SocketException if the factory has already been defined.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't allow the operation.
|
||||
* @see java.net.SocketImplFactory#createSocketImpl()
|
||||
* @see SecurityManager#checkSetFactory
|
||||
|
@ -928,13 +928,13 @@ class ServerSocket implements java.io.Closeable {
|
|||
* requested value but the TCP receive window in sockets accepted from
|
||||
* this ServerSocket will be no larger than 64K bytes.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @param size the size to which to set the receive buffer
|
||||
* size. This value must be greater than 0.
|
||||
*
|
||||
* @exception IllegalArgumentException if the
|
||||
* @throws IllegalArgumentException if the
|
||||
* value is 0 or is negative.
|
||||
*
|
||||
* @since 1.4
|
||||
|
@ -958,7 +958,7 @@ class ServerSocket implements java.io.Closeable {
|
|||
* calling {@link Socket#getReceiveBufferSize()}.
|
||||
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
|
||||
* option for this {@code Socket}.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @see #setReceiveBufferSize(int)
|
||||
* @since 1.4
|
||||
|
|
|
@ -180,7 +180,7 @@ class Socket implements java.io.Closeable {
|
|||
* @param impl an instance of a <B>SocketImpl</B>
|
||||
* the subclass wishes to use on the Socket.
|
||||
*
|
||||
* @exception SocketException if there is an error in the underlying protocol,
|
||||
* @throws SocketException if there is an error in the underlying protocol,
|
||||
* such as a TCP error.
|
||||
* @since 1.1
|
||||
*/
|
||||
|
@ -211,13 +211,13 @@ class Socket implements java.io.Closeable {
|
|||
* @param host the host name, or {@code null} for the loopback address.
|
||||
* @param port the port number.
|
||||
*
|
||||
* @exception UnknownHostException if the IP address of
|
||||
* @throws UnknownHostException if the IP address of
|
||||
* the host could not be determined.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs when creating the socket.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs when creating the socket.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the operation.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
|
||||
|
@ -249,13 +249,13 @@ class Socket implements java.io.Closeable {
|
|||
*
|
||||
* @param address the IP address.
|
||||
* @param port the port number.
|
||||
* @exception IOException if an I/O error occurs when creating the socket.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs when creating the socket.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the operation.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
* @exception NullPointerException if {@code address} is null.
|
||||
* @throws NullPointerException if {@code address} is null.
|
||||
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
|
||||
* @see java.net.SocketImpl
|
||||
* @see java.net.SocketImplFactory#createSocketImpl()
|
||||
|
@ -291,12 +291,12 @@ class Socket implements java.io.Closeable {
|
|||
* {@code null} for the {@code anyLocal} address.
|
||||
* @param localPort the local port the socket is bound to, or
|
||||
* {@code zero} for a system selected free port.
|
||||
* @exception IOException if an I/O error occurs when creating the socket.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs when creating the socket.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the connection
|
||||
* to the destination, or if its {@code checkListen} method
|
||||
* doesn't allow the bind to the local port.
|
||||
* @exception IllegalArgumentException if the port parameter or localPort
|
||||
* @throws IllegalArgumentException if the port parameter or localPort
|
||||
* parameter is outside the specified range of valid port values,
|
||||
* which is between 0 and 65535, inclusive.
|
||||
* @see SecurityManager#checkConnect
|
||||
|
@ -332,15 +332,15 @@ class Socket implements java.io.Closeable {
|
|||
* {@code null} for the {@code anyLocal} address.
|
||||
* @param localPort the local port the socket is bound to or
|
||||
* {@code zero} for a system selected free port.
|
||||
* @exception IOException if an I/O error occurs when creating the socket.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs when creating the socket.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the connection
|
||||
* to the destination, or if its {@code checkListen} method
|
||||
* doesn't allow the bind to the local port.
|
||||
* @exception IllegalArgumentException if the port parameter or localPort
|
||||
* @throws IllegalArgumentException if the port parameter or localPort
|
||||
* parameter is outside the specified range of valid port values,
|
||||
* which is between 0 and 65535, inclusive.
|
||||
* @exception NullPointerException if {@code address} is null.
|
||||
* @throws NullPointerException if {@code address} is null.
|
||||
* @see SecurityManager#checkConnect
|
||||
* @since 1.1
|
||||
*/
|
||||
|
@ -380,10 +380,10 @@ class Socket implements java.io.Closeable {
|
|||
* @param port the port number.
|
||||
* @param stream a {@code boolean} indicating whether this is
|
||||
* a stream socket or a datagram socket.
|
||||
* @exception IOException if an I/O error occurs when creating the socket.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs when creating the socket.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the operation.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
|
||||
|
@ -423,13 +423,13 @@ class Socket implements java.io.Closeable {
|
|||
* @param port the port number.
|
||||
* @param stream if {@code true}, create a stream socket;
|
||||
* otherwise, create a datagram socket.
|
||||
* @exception IOException if an I/O error occurs when creating the socket.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws IOException if an I/O error occurs when creating the socket.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkConnect} method doesn't allow the operation.
|
||||
* @exception IllegalArgumentException if the port parameter is outside
|
||||
* @throws IllegalArgumentException if the port parameter is outside
|
||||
* the specified range of valid port values, which is between
|
||||
* 0 and 65535, inclusive.
|
||||
* @exception NullPointerException if {@code host} is null.
|
||||
* @throws NullPointerException if {@code host} is null.
|
||||
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
|
||||
* @see java.net.SocketImpl
|
||||
* @see java.net.SocketImplFactory#createSocketImpl()
|
||||
|
@ -867,7 +867,7 @@ class Socket implements java.io.Closeable {
|
|||
* will close the associated socket.
|
||||
*
|
||||
* @return an input stream for reading bytes 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, the socket is closed, the socket is
|
||||
* not connected, or the socket input has been shutdown
|
||||
* using {@link #shutdownInput()}
|
||||
|
@ -942,7 +942,7 @@ class Socket implements java.io.Closeable {
|
|||
* will close the associated socket.
|
||||
*
|
||||
* @return an output stream for writing bytes 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 or if the socket is not connected.
|
||||
* @revised 1.4
|
||||
* @spec JSR-51
|
||||
|
@ -1002,7 +1002,7 @@ class Socket implements java.io.Closeable {
|
|||
* @param on {@code true} to enable TCP_NODELAY,
|
||||
* {@code false} to disable.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @since 1.1
|
||||
|
@ -1020,7 +1020,7 @@ class Socket implements java.io.Closeable {
|
|||
*
|
||||
* @return a {@code boolean} indicating whether or not
|
||||
* {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.1
|
||||
* @see #setTcpNoDelay(boolean)
|
||||
|
@ -1040,9 +1040,9 @@ class Socket implements java.io.Closeable {
|
|||
*
|
||||
* @param on whether or not to linger on.
|
||||
* @param linger how long to linger for, if on is true.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @exception IllegalArgumentException if the linger value is negative.
|
||||
* @throws IllegalArgumentException if the linger value is negative.
|
||||
* @since 1.1
|
||||
* @see #getSoLinger()
|
||||
*/
|
||||
|
@ -1069,7 +1069,7 @@ class Socket implements java.io.Closeable {
|
|||
* The setting only affects socket close.
|
||||
*
|
||||
* @return the setting for {@link SocketOptions#SO_LINGER SO_LINGER}.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.1
|
||||
* @see #setSoLinger(boolean, int)
|
||||
|
@ -1091,7 +1091,7 @@ class Socket implements java.io.Closeable {
|
|||
* sent after any preceding writes to the socket OutputStream
|
||||
* and before any future writes to the OutputStream.
|
||||
* @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
|
||||
*/
|
||||
|
@ -1120,7 +1120,7 @@ class Socket implements java.io.Closeable {
|
|||
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE},
|
||||
* {@code false} to disable.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @since 1.4
|
||||
|
@ -1139,7 +1139,7 @@ class Socket implements java.io.Closeable {
|
|||
* @return a {@code boolean} indicating whether or not
|
||||
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE} is enabled.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.4
|
||||
* @see #setOOBInline(boolean)
|
||||
|
@ -1182,7 +1182,7 @@ class Socket implements java.io.Closeable {
|
|||
* 0 returns implies that the option is disabled (i.e., timeout of infinity).
|
||||
*
|
||||
* @return the setting for {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @since 1.1
|
||||
|
@ -1211,13 +1211,13 @@ class Socket implements java.io.Closeable {
|
|||
* applications that want to verify what size the buffers were set to
|
||||
* should call {@link #getSendBufferSize()}.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @param size the size to which to set the send buffer
|
||||
* size. This value must be greater than 0.
|
||||
*
|
||||
* @exception IllegalArgumentException if the
|
||||
* @throws IllegalArgumentException if the
|
||||
* value is 0 or is negative.
|
||||
*
|
||||
* @see #getSendBufferSize()
|
||||
|
@ -1240,7 +1240,7 @@ class Socket implements java.io.Closeable {
|
|||
* @return the value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF}
|
||||
* option for this {@code Socket}.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @see #setSendBufferSize(int)
|
||||
|
@ -1287,10 +1287,10 @@ class Socket implements java.io.Closeable {
|
|||
* @param size the size to which to set the receive buffer
|
||||
* size. This value must be greater than 0.
|
||||
*
|
||||
* @exception IllegalArgumentException if the value is 0 or is
|
||||
* @throws IllegalArgumentException if the value is 0 or is
|
||||
* negative.
|
||||
*
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
*
|
||||
* @see #getReceiveBufferSize()
|
||||
|
@ -1314,7 +1314,7 @@ class Socket implements java.io.Closeable {
|
|||
*
|
||||
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
|
||||
* option for this {@code Socket}.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @see #setReceiveBufferSize(int)
|
||||
* @since 1.2
|
||||
|
@ -1335,7 +1335,7 @@ class Socket implements java.io.Closeable {
|
|||
* Enable/disable {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE}.
|
||||
*
|
||||
* @param on whether or not to have socket keep alive turned on.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.3
|
||||
* @see #getKeepAlive()
|
||||
|
@ -1351,7 +1351,7 @@ class Socket implements java.io.Closeable {
|
|||
*
|
||||
* @return a {@code boolean} indicating whether or not
|
||||
* {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.3
|
||||
* @see #setKeepAlive(boolean)
|
||||
|
@ -1470,7 +1470,7 @@ class Socket implements java.io.Closeable {
|
|||
* is not defined.
|
||||
*
|
||||
* @param on whether to enable or disable the socket option
|
||||
* @exception SocketException if an error occurs enabling or
|
||||
* @throws SocketException if an error occurs enabling or
|
||||
* disabling the {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
|
||||
* socket option, or the socket is closed.
|
||||
* @since 1.4
|
||||
|
@ -1490,7 +1490,7 @@ class Socket implements java.io.Closeable {
|
|||
*
|
||||
* @return a {@code boolean} indicating whether or not
|
||||
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
|
||||
* @exception SocketException if there is an error
|
||||
* @throws SocketException if there is an error
|
||||
* in the underlying protocol, such as a TCP error.
|
||||
* @since 1.4
|
||||
* @see #setReuseAddress(boolean)
|
||||
|
@ -1518,7 +1518,7 @@ class Socket implements java.io.Closeable {
|
|||
* <p> If this socket has an associated channel then the channel is closed
|
||||
* as well.
|
||||
*
|
||||
* @exception IOException if an I/O error occurs when closing this socket.
|
||||
* @throws IOException if an I/O error occurs when closing this socket.
|
||||
* @revised 1.4
|
||||
* @spec JSR-51
|
||||
* @see #isClosed
|
||||
|
@ -1542,7 +1542,7 @@ class Socket implements java.io.Closeable {
|
|||
* 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.
|
||||
*
|
||||
* @since 1.3
|
||||
|
@ -1572,7 +1572,7 @@ class Socket implements java.io.Closeable {
|
|||
* 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.
|
||||
*
|
||||
* @since 1.3
|
||||
|
@ -1700,10 +1700,10 @@ class Socket implements java.io.Closeable {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param fac the desired factory.
|
||||
* @exception IOException if an I/O error occurs when setting the
|
||||
* @throws IOException if an I/O error occurs when setting the
|
||||
* socket factory.
|
||||
* @exception SocketException if the factory is already defined.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SocketException if the factory is already defined.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't allow the operation.
|
||||
* @see java.net.SocketImplFactory#createSocketImpl()
|
||||
* @see SecurityManager#checkSetFactory
|
||||
|
|
|
@ -114,7 +114,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
*
|
||||
* @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;
|
||||
|
@ -124,7 +124,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
*
|
||||
* @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;
|
||||
|
@ -134,7 +134,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
*
|
||||
* @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;
|
||||
|
@ -146,7 +146,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
*
|
||||
* @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
|
||||
*/
|
||||
|
@ -157,7 +157,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
*
|
||||
* @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;
|
||||
|
||||
|
@ -168,7 +168,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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;
|
||||
|
||||
|
@ -176,7 +176,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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;
|
||||
|
@ -185,7 +185,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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;
|
||||
|
@ -194,7 +194,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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;
|
||||
|
@ -205,7 +205,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
*
|
||||
* @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;
|
||||
|
@ -213,7 +213,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
/**
|
||||
* 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;
|
||||
|
||||
|
@ -235,7 +235,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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()
|
||||
|
@ -255,7 +255,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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()
|
||||
|
@ -313,7 +313,7 @@ public abstract class SocketImpl implements SocketOptions {
|
|||
* 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
|
||||
*/
|
||||
|
|
|
@ -86,7 +86,7 @@ class SocketInputStream extends FileInputStream {
|
|||
* @param timeout the read timeout in ms
|
||||
* @return the actual number of bytes read, -1 is
|
||||
* returned when the end of the stream is reached.
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
private native int socketRead0(FileDescriptor fd,
|
||||
byte b[], int off, int len,
|
||||
|
@ -104,7 +104,7 @@ class SocketInputStream extends FileInputStream {
|
|||
* @param timeout the read timeout in ms
|
||||
* @return the actual number of bytes read, -1 is
|
||||
* returned when the end of the stream is reached.
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
private int socketRead(FileDescriptor fd,
|
||||
byte b[], int off, int len,
|
||||
|
@ -118,7 +118,7 @@ class SocketInputStream extends FileInputStream {
|
|||
* @param b the buffer into which the data is read
|
||||
* @return the actual number of bytes read, -1 is
|
||||
* returned when the end of the stream is reached.
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
public int read(byte b[]) throws IOException {
|
||||
return read(b, 0, b.length);
|
||||
|
@ -132,7 +132,7 @@ class SocketInputStream extends FileInputStream {
|
|||
* @param length the maximum number of bytes read
|
||||
* @return the actual number of bytes read, -1 is
|
||||
* returned when the end of the stream is reached.
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
public int read(byte b[], int off, int length) throws IOException {
|
||||
return read(b, off, length, impl.getTimeout());
|
||||
|
@ -206,7 +206,7 @@ class SocketInputStream extends FileInputStream {
|
|||
* Skips n bytes of input.
|
||||
* @param numbytes the number of bytes to skip
|
||||
* @return the actual number of bytes skipped.
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
public long skip(long numbytes) throws IOException {
|
||||
if (numbytes <= 0) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -81,11 +81,11 @@ public interface SocketOptions {
|
|||
* Throws SocketException if the option is unrecognized,
|
||||
* the socket is closed, or some low-level error occurred
|
||||
* <BR>
|
||||
* @param optID identifies the option
|
||||
* @param value the parameter of the socket option
|
||||
* @param optID identifies the option
|
||||
* @param value the parameter of the socket option
|
||||
* @throws SocketException if the option is unrecognized,
|
||||
* the socket is closed, or some low-level error occurred
|
||||
* @see #getOption(int)
|
||||
* the socket is closed, or some low-level error occurred
|
||||
* @see #getOption(int)
|
||||
*/
|
||||
public void
|
||||
setOption(int optID, Object value) throws SocketException;
|
||||
|
@ -116,7 +116,7 @@ public interface SocketOptions {
|
|||
* }
|
||||
* </PRE>
|
||||
*
|
||||
* @param optID an {@code int} identifying the option to fetch
|
||||
* @param optID an {@code int} identifying the option to fetch
|
||||
* @return the value of the option
|
||||
* @throws SocketException if the socket is closed
|
||||
* @throws SocketException if <I>optID</I> is unknown along the
|
||||
|
|
|
@ -79,7 +79,7 @@ class SocketOutputStream extends FileOutputStream {
|
|||
* @param b the data to be written
|
||||
* @param off the start offset in the data
|
||||
* @param len the number of bytes that are written
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
private native void socketWrite0(FileDescriptor fd, byte[] b, int off,
|
||||
int len) throws IOException;
|
||||
|
@ -90,7 +90,7 @@ class SocketOutputStream extends FileOutputStream {
|
|||
* @param b the data to be written
|
||||
* @param off the start offset in the data
|
||||
* @param len the number of bytes that are written
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
private void socketWrite(byte b[], int off, int len) throws IOException {
|
||||
|
||||
|
@ -120,7 +120,7 @@ class SocketOutputStream extends FileOutputStream {
|
|||
/**
|
||||
* Writes a byte to the socket.
|
||||
* @param b the data to be written
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
public void write(int b) throws IOException {
|
||||
temp[0] = (byte)b;
|
||||
|
@ -130,7 +130,7 @@ class SocketOutputStream extends FileOutputStream {
|
|||
/**
|
||||
* Writes the contents of the buffer <i>b</i> to the socket.
|
||||
* @param b the data to be written
|
||||
* @exception SocketException If an I/O error has occurred.
|
||||
* @throws SocketException If an I/O error has occurred.
|
||||
*/
|
||||
public void write(byte b[]) throws IOException {
|
||||
socketWrite(b, 0, b.length);
|
||||
|
@ -142,7 +142,7 @@ class SocketOutputStream extends FileOutputStream {
|
|||
* @param b the data to be written
|
||||
* @param off the start offset in the data
|
||||
* @param len the number of bytes that are written
|
||||
* @exception SocketException If an I/O error has occurred.
|
||||
* @throws SocketException If an I/O error has occurred.
|
||||
*/
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
socketWrite(b, off, len);
|
||||
|
|
|
@ -1361,10 +1361,10 @@ final class SocketPermissionCollection extends PermissionCollection
|
|||
*
|
||||
* @param permission the Permission object to add.
|
||||
*
|
||||
* @exception IllegalArgumentException - if the permission is not a
|
||||
* @throws IllegalArgumentException - if the permission is not a
|
||||
* SocketPermission
|
||||
*
|
||||
* @exception SecurityException - if this SocketPermissionCollection object
|
||||
* @throws SecurityException - if this SocketPermissionCollection object
|
||||
* has been marked readonly
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -349,7 +349,7 @@ public final class URL implements java.io.Serializable {
|
|||
* @param host the name of the host.
|
||||
* @param port the port number on the host.
|
||||
* @param file the file on the host
|
||||
* @exception MalformedURLException if an unknown protocol or the port
|
||||
* @throws MalformedURLException if an unknown protocol or the port
|
||||
* is a negative number other than -1
|
||||
* @see java.lang.System#getProperty(java.lang.String)
|
||||
* @see java.net.URL#setURLStreamHandlerFactory(
|
||||
|
@ -378,7 +378,7 @@ public final class URL implements java.io.Serializable {
|
|||
* @param protocol the name of the protocol to use.
|
||||
* @param host the name of the host.
|
||||
* @param file the file on the host.
|
||||
* @exception MalformedURLException if an unknown protocol is specified.
|
||||
* @throws MalformedURLException if an unknown protocol is specified.
|
||||
* @see java.net.URL#URL(java.lang.String, java.lang.String,
|
||||
* int, java.lang.String)
|
||||
*/
|
||||
|
@ -412,9 +412,9 @@ public final class URL implements java.io.Serializable {
|
|||
* @param port the port number on the host.
|
||||
* @param file the file on the host
|
||||
* @param handler the stream handler for the URL.
|
||||
* @exception MalformedURLException if an unknown protocol or the port
|
||||
* @throws MalformedURLException if an unknown protocol or the port
|
||||
is a negative number other than -1
|
||||
* @exception SecurityException
|
||||
* @throws SecurityException
|
||||
* if a security manager exists and its
|
||||
* {@code checkPermission} method doesn't allow
|
||||
* specifying a stream handler explicitly.
|
||||
|
@ -494,7 +494,7 @@ public final class URL implements java.io.Serializable {
|
|||
* constructor with a {@code null} first argument.
|
||||
*
|
||||
* @param spec the {@code String} to parse as a URL.
|
||||
* @exception MalformedURLException if no protocol is specified, or an
|
||||
* @throws MalformedURLException if no protocol is specified, or an
|
||||
* unknown protocol is found, or {@code spec} is {@code null},
|
||||
* or the parsed URL fails to comply with the specific syntax
|
||||
* of the associated protocol.
|
||||
|
@ -543,7 +543,7 @@ public final class URL implements java.io.Serializable {
|
|||
*
|
||||
* @param context the context in which to parse the specification.
|
||||
* @param spec the {@code String} to parse as a URL.
|
||||
* @exception MalformedURLException if no protocol is specified, or an
|
||||
* @throws MalformedURLException if no protocol is specified, or an
|
||||
* unknown protocol is found, or {@code spec} is {@code null},
|
||||
* or the parsed URL fails to comply with the specific syntax
|
||||
* of the associated protocol.
|
||||
|
@ -565,11 +565,11 @@ public final class URL implements java.io.Serializable {
|
|||
* @param context the context in which to parse the specification.
|
||||
* @param spec the {@code String} to parse as a URL.
|
||||
* @param handler the stream handler for the URL.
|
||||
* @exception MalformedURLException if no protocol is specified, or an
|
||||
* @throws MalformedURLException if no protocol is specified, or an
|
||||
* unknown protocol is found, or {@code spec} is {@code null},
|
||||
* or the parsed URL fails to comply with the specific syntax
|
||||
* of the associated protocol.
|
||||
* @exception SecurityException
|
||||
* @throws SecurityException
|
||||
* if a security manager exists and its
|
||||
* {@code checkPermission} method doesn't allow
|
||||
* specifying a stream handler.
|
||||
|
@ -1042,7 +1042,7 @@ public final class URL implements java.io.Serializable {
|
|||
* to a URI. However, some URLs that are not strictly in compliance
|
||||
* can not be converted to a URI.
|
||||
*
|
||||
* @exception URISyntaxException if this URL is not formatted strictly according to
|
||||
* @throws URISyntaxException if this URL is not formatted strictly according to
|
||||
* RFC2396 and cannot be converted to a URI.
|
||||
*
|
||||
* @return a URI instance equivalent to this URL.
|
||||
|
@ -1082,7 +1082,7 @@ public final class URL implements java.io.Serializable {
|
|||
*
|
||||
* @return a {@link java.net.URLConnection URLConnection} linking
|
||||
* to the URL.
|
||||
* @exception IOException if an I/O exception occurs.
|
||||
* @throws IOException if an I/O exception occurs.
|
||||
* @see java.net.URL#URL(java.lang.String, java.lang.String,
|
||||
* int, java.lang.String)
|
||||
*/
|
||||
|
@ -1103,13 +1103,13 @@ public final class URL implements java.io.Serializable {
|
|||
* will be made. If direct connection is desired,
|
||||
* Proxy.NO_PROXY should be specified.
|
||||
* @return a {@code URLConnection} to the URL.
|
||||
* @exception IOException if an I/O exception occurs.
|
||||
* @exception SecurityException if a security manager is present
|
||||
* @throws IOException if an I/O exception occurs.
|
||||
* @throws SecurityException if a security manager is present
|
||||
* and the caller doesn't have permission to connect
|
||||
* to the proxy.
|
||||
* @exception IllegalArgumentException will be thrown if proxy is null,
|
||||
* @throws IllegalArgumentException will be thrown if proxy is null,
|
||||
* or proxy has the wrong type
|
||||
* @exception UnsupportedOperationException if the subclass that
|
||||
* @throws UnsupportedOperationException if the subclass that
|
||||
* implements the protocol handler doesn't support
|
||||
* this method.
|
||||
* @see java.net.URL#URL(java.lang.String, java.lang.String,
|
||||
|
@ -1148,7 +1148,7 @@ public final class URL implements java.io.Serializable {
|
|||
* </pre></blockquote>
|
||||
*
|
||||
* @return an input stream for reading from the URL connection.
|
||||
* @exception IOException if an I/O exception occurs.
|
||||
* @throws IOException if an I/O exception occurs.
|
||||
* @see java.net.URL#openConnection()
|
||||
* @see java.net.URLConnection#getInputStream()
|
||||
*/
|
||||
|
@ -1163,7 +1163,7 @@ public final class URL implements java.io.Serializable {
|
|||
* </pre></blockquote>
|
||||
*
|
||||
* @return the contents of this URL.
|
||||
* @exception IOException if an I/O exception occurs.
|
||||
* @throws IOException if an I/O exception occurs.
|
||||
* @see java.net.URLConnection#getContent()
|
||||
*/
|
||||
public final Object getContent() throws java.io.IOException {
|
||||
|
@ -1180,7 +1180,7 @@ public final class URL implements java.io.Serializable {
|
|||
* @return the content object of this URL that is the first match of
|
||||
* the types specified in the classes array.
|
||||
* null if none of the requested types are supported.
|
||||
* @exception IOException if an I/O exception occurs.
|
||||
* @throws IOException if an I/O exception occurs.
|
||||
* @see java.net.URLConnection#getContent(Class[])
|
||||
* @since 1.3
|
||||
*/
|
||||
|
@ -1208,8 +1208,8 @@ public final class URL implements java.io.Serializable {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param fac the desired factory.
|
||||
* @exception Error if the application has already set a factory.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws Error if the application has already set a factory.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't allow
|
||||
* the operation.
|
||||
* @see java.net.URL#URL(java.lang.String, java.lang.String,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -99,12 +99,12 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* calls the security manager's {@code checkCreateClassLoader} method
|
||||
* to ensure creation of a class loader is allowed.
|
||||
*
|
||||
* @param urls the URLs from which to load classes and resources
|
||||
* @param parent the parent class loader for delegation
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @param urls the URLs from which to load classes and resources
|
||||
* @param parent the parent class loader for delegation
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkCreateClassLoader} method doesn't allow
|
||||
* creation of a class loader.
|
||||
* @exception NullPointerException if {@code urls} or any of its
|
||||
* @throws NullPointerException if {@code urls} or any of its
|
||||
* elements is {@code null}.
|
||||
* @see SecurityManager#checkCreateClassLoader
|
||||
*/
|
||||
|
@ -134,12 +134,12 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* calls the security manager's {@code checkCreateClassLoader} method
|
||||
* to ensure creation of a class loader is allowed.
|
||||
*
|
||||
* @param urls the URLs from which to load classes and resources
|
||||
* @param urls the URLs from which to load classes and resources
|
||||
*
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkCreateClassLoader} method doesn't allow
|
||||
* creation of a class loader.
|
||||
* @exception NullPointerException if {@code urls} or any of its
|
||||
* @throws NullPointerException if {@code urls} or any of its
|
||||
* elements is {@code null}.
|
||||
* @see SecurityManager#checkCreateClassLoader
|
||||
*/
|
||||
|
@ -166,15 +166,15 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* calls the security manager's {@code checkCreateClassLoader} method
|
||||
* to ensure creation of a class loader is allowed.
|
||||
*
|
||||
* @param urls the URLs from which to load classes and resources
|
||||
* @param parent the parent class loader for delegation
|
||||
* @param factory the URLStreamHandlerFactory to use when creating URLs
|
||||
* @param urls the URLs from which to load classes and resources
|
||||
* @param parent the parent class loader for delegation
|
||||
* @param factory the URLStreamHandlerFactory to use when creating URLs
|
||||
*
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* {@code checkCreateClassLoader} method doesn't allow
|
||||
* creation of a class loader.
|
||||
* @exception NullPointerException if {@code urls} or any of its
|
||||
* elements is {@code null}.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkCreateClassLoader} method doesn't allow
|
||||
* creation of a class loader.
|
||||
* @throws NullPointerException if {@code urls} or any of its
|
||||
* elements is {@code null}.
|
||||
* @see SecurityManager#checkCreateClassLoader
|
||||
*/
|
||||
public URLClassLoader(URL[] urls, ClassLoader parent,
|
||||
|
@ -326,13 +326,13 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* and errors are not caught. Calling close on an already closed
|
||||
* loader has no effect.
|
||||
*
|
||||
* @exception IOException if closing any file opened by this class loader
|
||||
* @throws IOException if closing any file opened by this class loader
|
||||
* resulted in an IOException. Any such exceptions are caught internally.
|
||||
* If only one is caught, then it is re-thrown. If more than one exception
|
||||
* is caught, then the second and following exceptions are added
|
||||
* as suppressed exceptions of the first one caught, which is then re-thrown.
|
||||
*
|
||||
* @exception SecurityException if a security manager is set, and it denies
|
||||
* @throws SecurityException if a security manager is set, and it denies
|
||||
* {@link RuntimePermission}{@code ("closeClassLoader")}
|
||||
*
|
||||
* @since 1.7
|
||||
|
@ -401,11 +401,11 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* path. Any URLs referring to JAR files are loaded and opened as needed
|
||||
* until the class is found.
|
||||
*
|
||||
* @param name the name of the class
|
||||
* @return the resulting class
|
||||
* @exception ClassNotFoundException if the class could not be found,
|
||||
* @param name the name of the class
|
||||
* @return the resulting class
|
||||
* @throws ClassNotFoundException if the class could not be found,
|
||||
* or if the loader is closed.
|
||||
* @exception NullPointerException if {@code name} is {@code null}.
|
||||
* @throws NullPointerException if {@code name} is {@code null}.
|
||||
*/
|
||||
protected Class<?> findClass(final String name)
|
||||
throws ClassNotFoundException
|
||||
|
@ -628,7 +628,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* on the URL search path having the specified name.
|
||||
*
|
||||
* @param name the resource name
|
||||
* @exception IOException if an I/O exception occurs
|
||||
* @throws IOException if an I/O exception occurs
|
||||
* @return An {@code Enumeration} of {@code URL}s.
|
||||
* If the loader is closed, the Enumeration contains no elements.
|
||||
*/
|
||||
|
@ -696,7 +696,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* If the protocol is not "file", then permission
|
||||
* to connect to and accept connections from the URL's host is granted.
|
||||
* @param codesource the codesource
|
||||
* @exception NullPointerException if {@code codesource} is {@code null}.
|
||||
* @throws NullPointerException if {@code codesource} is {@code null}.
|
||||
* @return the permissions granted to the codesource
|
||||
*/
|
||||
protected PermissionCollection getPermissions(CodeSource codesource)
|
||||
|
@ -776,7 +776,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
*
|
||||
* @param urls the URLs to search for classes and resources
|
||||
* @param parent the parent class loader for delegation
|
||||
* @exception NullPointerException if {@code urls} or any of its
|
||||
* @throws NullPointerException if {@code urls} or any of its
|
||||
* elements is {@code null}.
|
||||
* @return the resulting class loader
|
||||
*/
|
||||
|
@ -803,7 +803,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
|
|||
* loading the class.
|
||||
*
|
||||
* @param urls the URLs to search for classes and resources
|
||||
* @exception NullPointerException if {@code urls} or any of its
|
||||
* @throws NullPointerException if {@code urls} or any of its
|
||||
* elements is {@code null}.
|
||||
* @return the resulting class loader
|
||||
*/
|
||||
|
|
|
@ -327,7 +327,7 @@ public abstract class URLConnection {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param map the FileNameMap to be set
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't allow the operation.
|
||||
* @see SecurityManager#checkSetFactory
|
||||
* @see #getFileNameMap()
|
||||
|
@ -357,7 +357,7 @@ public abstract class URLConnection {
|
|||
*
|
||||
* @throws SocketTimeoutException if the timeout expires before
|
||||
* the connection can be established
|
||||
* @exception IOException if an I/O error occurs while opening the
|
||||
* @throws IOException if an I/O error occurs while opening the
|
||||
* connection.
|
||||
* @see java.net.URLConnection#connected
|
||||
* @see #getConnectTimeout()
|
||||
|
@ -734,9 +734,9 @@ public abstract class URLConnection {
|
|||
* @return the object fetched. The {@code instanceof} operator
|
||||
* should be used to determine the specific kind of object
|
||||
* returned.
|
||||
* @exception IOException if an I/O error occurs while
|
||||
* @throws IOException if an I/O error occurs while
|
||||
* getting the content.
|
||||
* @exception UnknownServiceException if the protocol does not support
|
||||
* @throws UnknownServiceException if the protocol does not support
|
||||
* the content type.
|
||||
* @see java.net.ContentHandlerFactory#createContentHandler(java.lang.String)
|
||||
* @see java.net.URLConnection#getContentType()
|
||||
|
@ -760,9 +760,9 @@ public abstract class URLConnection {
|
|||
* the requested types are supported.
|
||||
* The {@code instanceof} operator should be used to
|
||||
* determine the specific kind of object returned.
|
||||
* @exception IOException if an I/O error occurs while
|
||||
* @throws IOException if an I/O error occurs while
|
||||
* getting the content.
|
||||
* @exception UnknownServiceException if the protocol does not support
|
||||
* @throws UnknownServiceException if the protocol does not support
|
||||
* the content type.
|
||||
* @see java.net.URLConnection#getContent()
|
||||
* @see java.net.ContentHandlerFactory#createContentHandler(java.lang.String)
|
||||
|
@ -813,7 +813,7 @@ public abstract class URLConnection {
|
|||
* necessary to make the connection represented by this
|
||||
* URLConnection.
|
||||
*
|
||||
* @exception IOException if the computation of the permission
|
||||
* @throws IOException if the computation of the permission
|
||||
* requires network or file I/O and an exception occurs while
|
||||
* computing it.
|
||||
*/
|
||||
|
@ -829,9 +829,9 @@ public abstract class URLConnection {
|
|||
* is available for read.
|
||||
*
|
||||
* @return an input stream that reads from this open connection.
|
||||
* @exception IOException if an I/O error occurs while
|
||||
* @throws IOException if an I/O error occurs while
|
||||
* creating the input stream.
|
||||
* @exception UnknownServiceException if the protocol does not support
|
||||
* @throws UnknownServiceException if the protocol does not support
|
||||
* input.
|
||||
* @see #setReadTimeout(int)
|
||||
* @see #getReadTimeout()
|
||||
|
@ -844,9 +844,9 @@ public abstract class URLConnection {
|
|||
* Returns an output stream that writes to this connection.
|
||||
*
|
||||
* @return an output stream that writes to this connection.
|
||||
* @exception IOException if an I/O error occurs while
|
||||
* @throws IOException if an I/O error occurs while
|
||||
* creating the output stream.
|
||||
* @exception UnknownServiceException if the protocol does not support
|
||||
* @throws UnknownServiceException if the protocol does not support
|
||||
* output.
|
||||
*/
|
||||
public OutputStream getOutputStream() throws IOException {
|
||||
|
@ -1250,8 +1250,8 @@ public abstract class URLConnection {
|
|||
* This could result in a SecurityException.
|
||||
*
|
||||
* @param fac the desired factory.
|
||||
* @exception Error if the factory has already been defined.
|
||||
* @exception SecurityException if a security manager exists and its
|
||||
* @throws Error if the factory has already been defined.
|
||||
* @throws SecurityException if a security manager exists and its
|
||||
* {@code checkSetFactory} method doesn't allow the operation.
|
||||
* @see java.net.ContentHandlerFactory
|
||||
* @see java.net.URLConnection#getContent()
|
||||
|
@ -1479,7 +1479,7 @@ public abstract class URLConnection {
|
|||
* @param is an input stream that supports marks.
|
||||
* @return a guess at the content type, or {@code null} if none
|
||||
* can be determined.
|
||||
* @exception IOException if an I/O error occurs while reading the
|
||||
* @throws IOException if an I/O error occurs while reading the
|
||||
* input stream.
|
||||
* @see java.io.InputStream#mark(int)
|
||||
* @see java.io.InputStream#markSupported()
|
||||
|
|
|
@ -175,7 +175,7 @@ public final class URLPermission extends Permission {
|
|||
*
|
||||
* @param actions the actions string
|
||||
*
|
||||
* @exception IllegalArgumentException if url is invalid or if actions contains white-space.
|
||||
* @throws IllegalArgumentException if url is invalid or if actions contains white-space.
|
||||
*/
|
||||
public URLPermission(String url, String actions) {
|
||||
super(normalize(url));
|
||||
|
|
|
@ -66,7 +66,7 @@ public abstract class URLStreamHandler {
|
|||
*
|
||||
* @param u the URL that this connects to.
|
||||
* @return a {@code URLConnection} object for the {@code URL}.
|
||||
* @exception IOException if an I/O error occurs while opening the
|
||||
* @throws IOException if an I/O error occurs while opening the
|
||||
* connection.
|
||||
*/
|
||||
protected abstract URLConnection openConnection(URL u) throws IOException;
|
||||
|
@ -91,11 +91,11 @@ public abstract class URLStreamHandler {
|
|||
* If direct connection is desired, Proxy.NO_PROXY
|
||||
* should be specified.
|
||||
* @return a {@code URLConnection} object for the {@code URL}.
|
||||
* @exception IOException if an I/O error occurs while opening the
|
||||
* @throws IOException if an I/O error occurs while opening the
|
||||
* connection.
|
||||
* @exception IllegalArgumentException if either u or p is null,
|
||||
* @throws IllegalArgumentException if either u or p is null,
|
||||
* or p has the wrong type.
|
||||
* @exception UnsupportedOperationException if the subclass that
|
||||
* @throws UnsupportedOperationException if the subclass that
|
||||
* implements the protocol doesn't support this method.
|
||||
* @since 1.5
|
||||
*/
|
||||
|
@ -510,7 +510,7 @@ public abstract class URLStreamHandler {
|
|||
* @param path the path component of the URL.
|
||||
* @param query the query part for the URL.
|
||||
* @param ref the reference.
|
||||
* @exception SecurityException if the protocol handler of the URL is
|
||||
* @throws SecurityException if the protocol handler of the URL is
|
||||
* different from this one
|
||||
* @since 1.3
|
||||
*/
|
||||
|
@ -539,7 +539,7 @@ public abstract class URLStreamHandler {
|
|||
* @param port the port on the remote machine.
|
||||
* @param file the file.
|
||||
* @param ref the reference.
|
||||
* @exception SecurityException if the protocol handler of the URL is
|
||||
* @throws SecurityException if the protocol handler of the URL is
|
||||
* different from this one
|
||||
* @deprecated Use setURL(URL, String, String, int, String, String, String,
|
||||
* String);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue