InetAddress.java: Merged class documentation with classpath.

2003-05-02  Michael Koch  <konqueror@gmx.de>

	* java/net/InetAddress.java:
	Merged class documentation with classpath.
	* java/net/JarURLConnection.java:
	Explicitely import all used classes.
	* java/net/URL.java:
	Reformatting.
	* java/net/ServerSocket.java,
	java/net/Socket.java:
	New versions from classpath.

From-SVN: r66376
This commit is contained in:
Michael Koch 2003-05-02 09:27:59 +00:00 committed by Michael Koch
parent 9ab94a932c
commit 143f596a09
6 changed files with 126 additions and 18 deletions

View file

@ -291,16 +291,59 @@ public class Socket
if (sm != null)
sm.checkConnect(raddr.getHostName(), rport);
// create socket
impl.create(stream);
// FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port,
// i.e. '0' and if localAddr is unspecified, use getLocalAddress() as
// that default. JDK 1.2 doc infers not to do a bind.
// bind/connect to address/port
if (laddr != null)
impl.bind(laddr, lport);
{
try
{
impl.bind(laddr, lport);
}
catch (IOException exception)
{
impl.close();
throw exception;
}
catch (RuntimeException exception)
{
impl.close();
throw exception;
}
catch (Error error)
{
impl.close();
throw error;
}
}
if (raddr != null)
impl.connect(raddr, rport);
{
try
{
impl.connect(raddr, rport);
}
catch (IOException exception)
{
impl.close();
throw exception;
}
catch (RuntimeException exception)
{
impl.close();
throw exception;
}
catch (Error error)
{
impl.close();
throw error;
}
}
}
/**