2002-11-20 Michael Koch <konqueror@gmx.de>
* java/io/FileInputStream.java (getChannel): New method. * java/io/FileOutputStream.java (getChannel): New method. * java/net/ServerSocket.java (bind): Removed duplicate code and called another bind method instead. * java/nio/channels/SelectionKey.java (isValid): Removed wrong exception documentation. * java/nio/channels/ServerSocketChannel.java (accept): Added exception documentation. (open): Fixed typo, added exception documentation. * java/nio/channels/spi/AbstractSelectableChannel.java (implCloseChannel): Added exception documentation. (add): Reformated. (register): Added exception documentation. From-SVN: r59307
This commit is contained in:
parent
e6226a2f87
commit
3ebb998e6f
7 changed files with 65 additions and 25 deletions
|
@ -151,6 +151,7 @@ public class ServerSocket
|
|||
throws IOException
|
||||
{
|
||||
this();
|
||||
|
||||
if (impl == null)
|
||||
throw new IOException("Cannot initialize Socket implementation");
|
||||
|
||||
|
@ -181,19 +182,7 @@ public class ServerSocket
|
|||
public void bind (SocketAddress endpoint)
|
||||
throws IOException
|
||||
{
|
||||
if (impl == null)
|
||||
throw new IOException ("Cannot initialize Socket implementation");
|
||||
|
||||
if (! (endpoint instanceof InetSocketAddress))
|
||||
throw new IllegalArgumentException ("Address type not supported");
|
||||
|
||||
InetSocketAddress tmp = (InetSocketAddress) endpoint;
|
||||
|
||||
SecurityManager s = System.getSecurityManager ();
|
||||
if (s != null)
|
||||
s.checkListen (tmp.getPort ());
|
||||
|
||||
impl.bind (tmp.getAddress (), tmp.getPort ());
|
||||
bind (endpoint, 50);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue