2002-01-12 11:11:13 +01:00
|
|
|
/* ServerSocket.java -- Class for implementing server side sockets
|
2004-01-30 14:43:21 +01:00
|
|
|
Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004
|
|
|
|
Free Software Foundation, Inc.
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
This file is part of GNU Classpath.
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
GNU Classpath is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
GNU Classpath is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
|
|
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA.
|
1999-04-07 16:42:40 +02:00
|
|
|
|
2002-01-22 23:40:42 +01:00
|
|
|
Linking this library statically or dynamically with other modules is
|
|
|
|
making a combined work based on this library. Thus, the terms and
|
|
|
|
conditions of the GNU General Public License cover the whole
|
|
|
|
combination.
|
|
|
|
|
|
|
|
As a special exception, the copyright holders of this library give you
|
|
|
|
permission to link this library with independent modules to produce an
|
|
|
|
executable, regardless of the license terms of these independent
|
|
|
|
modules, and to copy and distribute the resulting executable under
|
|
|
|
terms of your choice, provided that you also meet, for each linked
|
|
|
|
independent module, the terms and conditions of the license of that
|
|
|
|
module. An independent module is a module which is not derived from
|
|
|
|
or based on this library. If you modify this library, you may extend
|
|
|
|
this exception to your version of the library, but you are not
|
|
|
|
obligated to do so. If you do not wish to do so, delete this
|
|
|
|
exception statement from your version. */
|
1999-04-07 16:42:40 +02:00
|
|
|
|
|
|
|
package java.net;
|
|
|
|
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
import gnu.java.net.PlainSocketImpl;
|
2002-01-12 11:11:13 +01:00
|
|
|
import java.io.IOException;
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
import java.nio.channels.IllegalBlockingModeException;
|
2002-09-21 08:59:20 +02:00
|
|
|
import java.nio.channels.ServerSocketChannel;
|
2002-01-12 11:11:13 +01:00
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/* Written using on-line Java Platform 1.2 API Specification.
|
|
|
|
* Status: I believe all methods are implemented.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class models server side sockets. The basic model is that the
|
|
|
|
* server socket is created and bound to some well known port. It then
|
|
|
|
* listens for and accepts connections. At that point the client and
|
|
|
|
* server sockets are ready to communicate with one another utilizing
|
|
|
|
* whatever application layer protocol they desire.
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
*
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* As with the <code>Socket</code> class, most instance methods of this class
|
2002-01-12 11:11:13 +01:00
|
|
|
* simply redirect their calls to an implementation class.
|
|
|
|
*
|
|
|
|
* @author Aaron M. Renn (arenn@urbanophile.com)
|
|
|
|
* @author Per Bothner (bothner@cygnus.com)
|
|
|
|
*/
|
1999-04-07 16:42:40 +02:00
|
|
|
public class ServerSocket
|
|
|
|
{
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* This is the user defined SocketImplFactory, if one is supplied
|
|
|
|
*/
|
|
|
|
private static SocketImplFactory factory;
|
1999-08-03 02:30:53 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* This is the SocketImp object to which most instance methods in this
|
|
|
|
* class are redirected
|
|
|
|
*/
|
|
|
|
private SocketImpl impl;
|
|
|
|
|
2003-11-26 13:45:21 +01:00
|
|
|
/**
|
|
|
|
* True if socket is bound.
|
|
|
|
*/
|
|
|
|
private boolean bound;
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-10-02 17:17:13 +02:00
|
|
|
/*
|
2003-10-11 20:01:35 +02:00
|
|
|
* This constructor is only used by java.nio.
|
2003-10-02 17:17:13 +02:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-10-02 17:17:13 +02:00
|
|
|
// FIXME: Workaround a bug in gcj.
|
|
|
|
//ServerSocket (PlainSocketImpl impl) throws IOException
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
ServerSocket(SocketImpl impl) throws IOException
|
2003-10-02 17:17:13 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (impl == null)
|
|
|
|
throw new NullPointerException("impl may not be null");
|
|
|
|
|
2003-10-02 17:17:13 +02:00
|
|
|
this.impl = impl;
|
|
|
|
this.impl.create (true);
|
|
|
|
}
|
2003-10-11 20:01:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This method is only used by java.nio.
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-10-11 20:01:35 +02:00
|
|
|
// FIXME: Workaround a bug in gcj.
|
|
|
|
//PlainSocketImpl getImpl()
|
|
|
|
SocketImpl getImpl()
|
|
|
|
{
|
|
|
|
return impl;
|
|
|
|
}
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* Constructor that simply sets the implementation.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception IOException If an error occurs
|
|
|
|
*
|
|
|
|
* @specnote This constructor is public since JDK 1.4
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
public ServerSocket() throws IOException
|
2002-01-12 11:11:13 +01:00
|
|
|
{
|
|
|
|
if (factory != null)
|
|
|
|
impl = factory.createSocketImpl();
|
|
|
|
else
|
|
|
|
impl = new PlainSocketImpl();
|
2002-11-18 14:22:55 +01:00
|
|
|
|
|
|
|
impl.create(true);
|
2002-01-12 11:11:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a server socket and binds it to the specified port. If the
|
|
|
|
* port number is 0, a random free port will be chosen. The pending
|
|
|
|
* connection queue on this socket will be set to 50.
|
|
|
|
*
|
|
|
|
* @param port The port number to bind to
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-01-12 11:11:13 +01:00
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception SecurityException If a security manager exists and its
|
|
|
|
* checkListen method doesn't allow the operation
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public ServerSocket(int port) throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
1999-06-17 02:21:26 +02:00
|
|
|
this(port, 50);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* Creates a server socket and binds it to the specified port. If the
|
|
|
|
* port number is 0, a random free port will be chosen. The pending
|
|
|
|
* connection queue on this socket will be set to the value passed as
|
|
|
|
* arg2.
|
|
|
|
*
|
|
|
|
* @param port The port number to bind to
|
|
|
|
* @param backlog The length of the pending connection queue
|
|
|
|
*
|
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception SecurityException If a security manager exists and its
|
|
|
|
* checkListen method doesn't allow the operation
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public ServerSocket(int port, int backlog) throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2002-01-12 11:11:13 +01:00
|
|
|
this(port, backlog, null);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* Creates a server socket and binds it to the specified port. If the
|
|
|
|
* port number is 0, a random free port will be chosen. The pending
|
|
|
|
* connection queue on this socket will be set to the value passed as
|
|
|
|
* backlog. The third argument specifies a particular local address to
|
|
|
|
* bind t or null to bind to all local address.
|
|
|
|
*
|
|
|
|
* @param port The port number to bind to
|
|
|
|
* @param backlog The length of the pending connection queue
|
|
|
|
* @param bindAddr The address to bind to, or null to bind to all addresses
|
|
|
|
*
|
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception SecurityException If a security manager exists and its
|
|
|
|
* checkListen method doesn't allow the operation
|
BindException.java, [...]: add/update of some @since/@deprecated
2002-08-27 Michael Koch <konqueror@gmx.de>
* java/net/BindException.java,
java/net/JarURLConnection.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/InetSocketAddress.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/MulticastSocket.java,
java/net/PasswordAuthentication.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java: add/update of some @since/@deprecated
From-SVN: r56608
2002-08-27 19:47:27 +02:00
|
|
|
*
|
|
|
|
* @since 1.1
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public ServerSocket(int port, int backlog, InetAddress bindAddr)
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2002-01-12 11:11:13 +01:00
|
|
|
this();
|
2002-11-20 17:19:08 +01:00
|
|
|
|
2003-06-19 17:08:22 +02:00
|
|
|
// bind/listen socket
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
bind(new InetSocketAddress(bindAddr, port), backlog);
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
/**
|
|
|
|
* Binds the server socket to a specified socket address
|
|
|
|
*
|
|
|
|
* @param endpoint The socket address to bind to
|
|
|
|
*
|
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception IllegalArgumentException If address type is not supported
|
|
|
|
* @exception SecurityException If a security manager exists and its
|
|
|
|
* checkListen method doesn't allow the operation
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @since 1.4
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public void bind(SocketAddress endpoint) throws IOException
|
2002-09-11 12:16:00 +02:00
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
bind(endpoint, 50);
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
/**
|
|
|
|
* Binds the server socket to a specified socket address
|
|
|
|
*
|
|
|
|
* @param endpoint The socket address to bind to
|
|
|
|
* @param backlog The length of the pending connection queue
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception IllegalArgumentException If address type is not supported
|
|
|
|
* @exception SecurityException If a security manager exists and its
|
|
|
|
* checkListen method doesn't allow the operation
|
|
|
|
*
|
|
|
|
* @since 1.4
|
2002-09-11 12:16:00 +02:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public void bind(SocketAddress endpoint, int backlog)
|
|
|
|
throws IOException
|
2002-09-11 12:16:00 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
if (! (endpoint instanceof InetSocketAddress))
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
throw new IllegalArgumentException("Address type not supported");
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
InetSocketAddress tmp = (InetSocketAddress) endpoint;
|
2003-12-25 18:31:13 +01:00
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
SecurityManager s = System.getSecurityManager();
|
2002-09-11 12:16:00 +02:00
|
|
|
if (s != null)
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
s.checkListen(tmp.getPort());
|
2002-09-11 12:16:00 +02:00
|
|
|
|
2003-12-25 18:31:13 +01:00
|
|
|
InetAddress addr = tmp.getAddress();
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-12-25 18:31:13 +01:00
|
|
|
// Initialize addr with 0.0.0.0.
|
|
|
|
if (addr == null)
|
|
|
|
addr = InetAddress.ANY_IF;
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-06-19 17:08:22 +02:00
|
|
|
try
|
|
|
|
{
|
2003-12-25 18:31:13 +01:00
|
|
|
impl.bind(addr, tmp.getPort());
|
2003-08-07 08:30:16 +02:00
|
|
|
impl.listen(backlog);
|
2003-11-26 13:45:21 +01:00
|
|
|
bound = true;
|
2003-06-19 17:08:22 +02:00
|
|
|
}
|
|
|
|
catch (IOException exception)
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
close();
|
|
|
|
throw exception;
|
2003-06-19 17:08:22 +02:00
|
|
|
}
|
|
|
|
catch (RuntimeException exception)
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
close();
|
|
|
|
throw exception;
|
2003-06-19 17:08:22 +02:00
|
|
|
}
|
|
|
|
catch (Error error)
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
close();
|
|
|
|
throw error;
|
2003-06-19 17:08:22 +02:00
|
|
|
}
|
|
|
|
}
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* This method returns the local address to which this socket is bound
|
|
|
|
*
|
|
|
|
* @return The socket's local address
|
|
|
|
*/
|
1999-04-07 16:42:40 +02:00
|
|
|
public InetAddress getInetAddress()
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
if (! isBound())
|
2003-11-25 11:09:48 +01:00
|
|
|
return null;
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
try
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
return (InetAddress) impl.getOption(SocketOptions.SO_BINDADDR);
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
|
|
|
catch (SocketException e)
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
// This never happens as we are bound.
|
|
|
|
return null;
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* This method returns the local port number to which this socket is bound
|
|
|
|
*
|
|
|
|
* @return The socket's port number
|
|
|
|
*/
|
1999-04-07 16:42:40 +02:00
|
|
|
public int getLocalPort()
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
if (! isBound())
|
2003-11-25 11:09:48 +01:00
|
|
|
return -1;
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
1999-04-07 16:42:40 +02:00
|
|
|
return impl.getLocalPort();
|
|
|
|
}
|
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
/**
|
|
|
|
* Returns the local socket address
|
|
|
|
*
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* @return the local socket address, null if not bound
|
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @since 1.4
|
|
|
|
*/
|
|
|
|
public SocketAddress getLocalSocketAddress()
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
if (! isBound())
|
2003-11-25 11:09:48 +01:00
|
|
|
return null;
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-11-25 11:09:48 +01:00
|
|
|
return new InetSocketAddress(getInetAddress(), getLocalPort());
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* Accepts a new connection and returns a connected <code>Socket</code>
|
|
|
|
* instance representing that connection. This method will block until a
|
2002-01-12 11:11:13 +01:00
|
|
|
* connection is available.
|
|
|
|
*
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* @return socket object for the just accepted connection
|
|
|
|
*
|
2002-01-12 11:11:13 +01:00
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception SecurityException If a security manager exists and its
|
|
|
|
* checkListen method doesn't allow the operation
|
|
|
|
* @exception IllegalBlockingModeException If this socket has an associated
|
|
|
|
* channel, and the channel is in non-blocking mode
|
|
|
|
* @exception SocketTimeoutException If a timeout was previously set with
|
|
|
|
* setSoTimeout and the timeout has been reached
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public Socket accept() throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
SecurityManager sm = System.getSecurityManager();
|
2002-10-03 16:30:48 +02:00
|
|
|
if (sm != null)
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
sm.checkListen(impl.getLocalPort());
|
2002-10-03 16:30:48 +02:00
|
|
|
|
2003-11-25 11:09:48 +01:00
|
|
|
Socket socket = new Socket();
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2004-03-21 12:00:48 +01:00
|
|
|
try
|
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
implAccept(socket);
|
2004-03-21 12:00:48 +01:00
|
|
|
}
|
|
|
|
catch (IOException e)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
socket.close();
|
|
|
|
}
|
|
|
|
catch (IOException e2)
|
|
|
|
{
|
|
|
|
}
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2004-03-21 12:00:48 +01:00
|
|
|
throw e;
|
|
|
|
}
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-11-25 11:09:48 +01:00
|
|
|
return socket;
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* This protected method is used to help subclasses override
|
2002-01-12 11:11:13 +01:00
|
|
|
* <code>ServerSocket.accept()</code>. The passed in socket will be
|
|
|
|
* connected when this method returns.
|
|
|
|
*
|
|
|
|
* @param socket The socket that is used for the accepted connection
|
|
|
|
*
|
|
|
|
* @exception IOException If an error occurs
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception IllegalBlockingModeException If this socket has an associated
|
|
|
|
* channel, and the channel is in non-blocking mode
|
BindException.java, [...]: add/update of some @since/@deprecated
2002-08-27 Michael Koch <konqueror@gmx.de>
* java/net/BindException.java,
java/net/JarURLConnection.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/InetSocketAddress.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/MulticastSocket.java,
java/net/PasswordAuthentication.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java: add/update of some @since/@deprecated
From-SVN: r56608
2002-08-27 19:47:27 +02:00
|
|
|
*
|
|
|
|
* @since 1.1
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
protected final void implAccept(Socket socket) throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2004-01-30 14:43:21 +01:00
|
|
|
// The Sun spec says that if we have an associated channel and
|
|
|
|
// it is in non-blocking mode, we throw an IllegalBlockingModeException.
|
|
|
|
// However, in our implementation if the channel itself initiated this
|
|
|
|
// operation, then we must honor it regardless of its blocking mode.
|
2003-09-18 13:32:46 +02:00
|
|
|
if (getChannel() != null
|
2004-01-30 14:43:21 +01:00
|
|
|
&& !getChannel().isBlocking ()
|
|
|
|
&& !((PlainSocketImpl) getImpl()).isInChannelOperation())
|
|
|
|
throw new IllegalBlockingModeException ();
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
|
2003-11-25 11:09:48 +01:00
|
|
|
impl.accept(socket.getImpl());
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* Closes this socket and stops listening for connections
|
|
|
|
*
|
|
|
|
* @exception IOException If an error occurs
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public void close() throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2003-12-09 16:39:23 +01:00
|
|
|
if (isClosed())
|
|
|
|
return;
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2003-12-09 16:39:23 +01:00
|
|
|
impl.close();
|
|
|
|
impl = null;
|
|
|
|
bound = false;
|
2003-01-11 02:17:19 +01:00
|
|
|
|
2003-12-09 16:39:23 +01:00
|
|
|
if (getChannel() != null)
|
|
|
|
getChannel().close();
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-09-21 08:59:20 +02:00
|
|
|
/**
|
|
|
|
* Returns the unique ServerSocketChannel object
|
|
|
|
* associated with this socket, if any.
|
|
|
|
*
|
|
|
|
* The socket only has a ServerSocketChannel if its created
|
|
|
|
* by ServerSocketChannel.open.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
|
|
|
* @return the associated socket channel, null if none exists
|
2002-09-21 08:59:20 +02:00
|
|
|
*
|
|
|
|
* @since 1.4
|
|
|
|
*/
|
|
|
|
public ServerSocketChannel getChannel()
|
|
|
|
{
|
2003-09-18 13:32:46 +02:00
|
|
|
return null;
|
2002-09-21 08:59:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2004-01-07 17:37:45 +01:00
|
|
|
* Returns true when the socket is bound, otherwise false
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
|
|
|
* @return true if socket is bound, false otherwise
|
2002-09-21 08:59:20 +02:00
|
|
|
*
|
|
|
|
* @since 1.4
|
|
|
|
*/
|
|
|
|
public boolean isBound()
|
|
|
|
{
|
2003-11-26 13:45:21 +01:00
|
|
|
return bound;
|
2002-09-21 08:59:20 +02:00
|
|
|
}
|
|
|
|
|
2002-10-03 16:30:48 +02:00
|
|
|
/**
|
|
|
|
* Returns true if the socket is closed, otherwise false
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
|
|
|
* @return true if socket is closed, false otherwise
|
2002-10-03 16:30:48 +02:00
|
|
|
*
|
|
|
|
* @since 1.4
|
|
|
|
*/
|
|
|
|
public boolean isClosed()
|
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
return impl == null;
|
2002-10-03 16:30:48 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* Sets the value of SO_TIMEOUT. A value of 0 implies that SO_TIMEOUT is
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* disabled (ie, operations never time out). This is the number of
|
2002-01-12 11:11:13 +01:00
|
|
|
* milliseconds a socket operation can block before an
|
|
|
|
* InterruptedIOException is thrown.
|
|
|
|
*
|
|
|
|
* @param timeout The new SO_TIMEOUT value
|
|
|
|
*
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception SocketException If an error occurs
|
BindException.java, [...]: add/update of some @since/@deprecated
2002-08-27 Michael Koch <konqueror@gmx.de>
* java/net/BindException.java,
java/net/JarURLConnection.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/InetSocketAddress.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/MulticastSocket.java,
java/net/PasswordAuthentication.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java: add/update of some @since/@deprecated
From-SVN: r56608
2002-08-27 19:47:27 +02:00
|
|
|
*
|
|
|
|
* @since 1.1
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public void setSoTimeout(int timeout) throws SocketException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
1999-05-26 19:00:06 +02:00
|
|
|
if (timeout < 0)
|
2002-01-12 11:11:13 +01:00
|
|
|
throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0");
|
1999-05-26 19:00:06 +02:00
|
|
|
|
|
|
|
impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
|
|
|
* Retrieves the current value of the SO_TIMEOUT setting. A value of 0
|
|
|
|
* implies that SO_TIMEOUT is disabled (ie, operations never time out).
|
|
|
|
* This is the number of milliseconds a socket operation can block before
|
|
|
|
* an InterruptedIOException is thrown.
|
|
|
|
*
|
|
|
|
* @return The value of SO_TIMEOUT
|
|
|
|
*
|
|
|
|
* @exception IOException If an error occurs
|
BindException.java, [...]: add/update of some @since/@deprecated
2002-08-27 Michael Koch <konqueror@gmx.de>
* java/net/BindException.java,
java/net/JarURLConnection.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/InetSocketAddress.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/MulticastSocket.java,
java/net/PasswordAuthentication.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java: add/update of some @since/@deprecated
From-SVN: r56608
2002-08-27 19:47:27 +02:00
|
|
|
*
|
|
|
|
* @since 1.1
|
2002-01-12 11:11:13 +01:00
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public int getSoTimeout() throws IOException
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
1999-05-26 19:00:06 +02:00
|
|
|
Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT);
|
2002-01-12 11:11:13 +01:00
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
if (! (timeout instanceof Integer))
|
2002-01-12 11:11:13 +01:00
|
|
|
throw new IOException("Internal Error");
|
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
return ((Integer) timeout).intValue();
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
/**
|
|
|
|
* Enables/Disables the SO_REUSEADDR option
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
|
|
|
* @param on true if SO_REUSEADDR should be enabled, false otherwise
|
2002-09-11 12:16:00 +02:00
|
|
|
*
|
|
|
|
* @exception SocketException If an error occurs
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @since 1.4
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public void setReuseAddress(boolean on) throws SocketException
|
2002-09-11 12:16:00 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
|
|
|
impl.setOption(SocketOptions.SO_REUSEADDR, Boolean.valueOf(on));
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if the SO_REUSEADDR option is enabled
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
|
|
|
* @return true if SO_REUSEADDR is set, false otherwise
|
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @exception SocketException If an error occurs
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @since 1.4
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public boolean getReuseAddress() throws SocketException
|
2002-09-11 12:16:00 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
2002-09-11 12:16:00 +02:00
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
Object reuseaddr = impl.getOption(SocketOptions.SO_REUSEADDR);
|
|
|
|
|
|
|
|
if (! (reuseaddr instanceof Boolean))
|
|
|
|
throw new SocketException("Internal Error");
|
|
|
|
|
|
|
|
return ((Boolean) reuseaddr).booleanValue();
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method sets the value for the system level socket option
|
|
|
|
* SO_RCVBUF to the specified value. Note that valid values for this
|
|
|
|
* option are specific to a given operating system.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @param size The new receive buffer size.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @exception SocketException If an error occurs or Socket is not connected
|
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java
(DatagramSocket): Exception documentation added.
(bind): Exception documentation added, addded SecurityManager check,
added SocketAddress type check.
(getSoTimeout): Check impl.
(receive): Fix SecurityManager check, check impl, documentation added.
(send): Check channel mode, documentation added.
(connect): New method.
(disconnect): Implemented.
(getLocalSocketAddress): New method.
(getReceiveBufferSize): Check impl.
(setReuseAddress): Check impl.
(getReuseAddress): Check impl.
(setBroadcast): Check impl.
(getBroadcast): Check impl.
(setTrafficClass): Check impl, Documentation cleared.
(getTrafficClass): Check impl.
(getSendBufferSize): Check impl.
(setReceiveBufferSize): Check impl, documentation added.
(setSendBufferSize): Documentation added.
(setDatagramSocketImplFactory): New method.
* java/net/HttpURLConnection.java
(HTTP_INTERNAL_ERROR): The correct code is 500.
(HTTP_NOT_IMPLEMENTED): Added new constant.
(setFollowRedirects): Documentation added.
(getInstanceFollowRedirects): New method.
(setInstanceFollowRedirects): New method.
(setRequestMethod): Documentation added.
(getResponseCode): Documentation added.
(getResponseMessage): Documentation added.
* java/net/JarURLConnection.java
(JarURLConnection): protected since JDK 1.4.
(getJarEntry): java.io.IOException to IOException, documentation added.
(getJarFile): Documentation added.
* java/net/ServerSocket.java
(ServerSocket): Private to public, exception added.
(ServerSocket): java.io.IOException to IOException, documentation added.
(bind): Check socket address type, documentation added.
(bind): java.io.IOException to IOException, documentation added.
(accept): Documentation added.
(implAccept): Check ch is not non-blocking, documentation added.
(setSoTimeout): Documentation fixed.
(setReceiveBufferSize): Documentation added.
* java/net/Socket.java
(Socket): Documentation added.
(bind): Documentation added.
(connect): Check socket address type, documentation added.
(getRemoteSocketAddress): New method.
From-SVN: r57494
2002-09-25 11:05:53 +02:00
|
|
|
* @exception IllegalArgumentException If size is 0 or negative
|
2002-09-11 12:16:00 +02:00
|
|
|
*
|
|
|
|
* @since 1.4
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public void setReceiveBufferSize(int size) throws SocketException
|
2002-09-11 12:16:00 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
|
2002-09-11 12:16:00 +02:00
|
|
|
if (size <= 0)
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
throw new IllegalArgumentException("SO_RCVBUF value must be > 0");
|
2002-09-11 12:16:00 +02:00
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size));
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method returns the value of the system level socket option
|
|
|
|
* SO_RCVBUF, which is used by the operating system to tune buffer
|
|
|
|
* sizes for data transfers.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @return The receive buffer size.
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @exception SocketException If an error occurs or Socket is not connected
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
*
|
2002-09-11 12:16:00 +02:00
|
|
|
* @since 1.4
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public int getReceiveBufferSize() throws SocketException
|
2002-09-11 12:16:00 +02:00
|
|
|
{
|
2003-11-25 11:09:48 +01:00
|
|
|
if (isClosed())
|
|
|
|
throw new SocketException("ServerSocket is closed");
|
2002-09-11 12:16:00 +02:00
|
|
|
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
Object buf = impl.getOption(SocketOptions.SO_RCVBUF);
|
|
|
|
|
|
|
|
if (! (buf instanceof Integer))
|
|
|
|
throw new SocketException("Internal Error: Unexpected type");
|
|
|
|
|
|
|
|
return ((Integer) buf).intValue();
|
2002-09-11 12:16:00 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* Returns the value of this socket as a <code>String</code>.
|
2002-01-12 11:11:13 +01:00
|
|
|
*
|
|
|
|
* @return This socket represented as a <code>String</code>.
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public String toString()
|
1999-04-07 16:42:40 +02:00
|
|
|
{
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
if (! isBound())
|
2003-11-25 11:09:48 +01:00
|
|
|
return "ServerSocket[unbound]";
|
|
|
|
|
2003-12-02 16:23:23 +01:00
|
|
|
return ("ServerSocket[addr=" + getInetAddress()
|
2003-11-25 11:09:48 +01:00
|
|
|
+ ",port=" + impl.getPort()
|
|
|
|
+ ",localport=" + impl.getLocalPort()
|
|
|
|
+ "]");
|
1999-04-07 16:42:40 +02:00
|
|
|
}
|
|
|
|
|
2002-01-12 11:11:13 +01:00
|
|
|
/**
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* Sets the <code>SocketImplFactory</code> for all
|
2002-01-12 11:11:13 +01:00
|
|
|
* <code>ServerSocket</code>'s. This may only be done
|
|
|
|
* once per virtual machine. Subsequent attempts will generate an
|
|
|
|
* exception. Note that a <code>SecurityManager</code> check is made prior
|
|
|
|
* to setting the factory. If insufficient privileges exist to set the
|
|
|
|
* factory, an exception will be thrown
|
|
|
|
*
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
* @param fac the factory to set
|
|
|
|
*
|
2002-01-12 11:11:13 +01:00
|
|
|
* @exception SecurityException If this operation is not allowed by the
|
|
|
|
* <code>SecurityManager</code>.
|
|
|
|
* @exception SocketException If the factory object is already defined
|
|
|
|
* @exception IOException If any other error occurs
|
|
|
|
*/
|
Authenticator.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java,
java/net/BindException.java,
java/net/ConnectException.java,
java/net/ContentHandler.java,
java/net/ContentHandlerFactory.java,
java/net/DatagramPacket.java,
java/net/DatagramSocket.java,
java/net/DatagramSocketImpl.java,
java/net/DatagramSocketImplFactory.java,
java/net/FileNameMap.java,
java/net/HttpURLConnection.java,
java/net/Inet4Address.java,
java/net/Inet6Address.java,
java/net/InetAddress.java,
java/net/InetSocketAddress.java,
java/net/JarURLConnection.java,
java/net/MalformedURLException.java,
java/net/MulticastSocket.java,
java/net/NetPermission.java,
java/net/NetworkInterface.java,
java/net/NoRouteToHostException.java,
java/net/PasswordAuthentication.java,
java/net/PortUnreachableException.java,
java/net/ProtocolException.java,
java/net/ServerSocket.java,
java/net/Socket.java,
java/net/SocketAddress.java,
java/net/SocketException.java,
java/net/SocketImpl.java,
java/net/SocketImplFactory.java,
java/net/SocketOptions.java,
java/net/SocketPermission.java,
java/net/SocketTimeoutException.java,
java/net/URI.java,
java/net/URISyntaxException.java,
java/net/URL.java,
java/net/URLClassLoader.java,
java/net/URLConnection.java,
java/net/URLDecoder.java,
java/net/URLEncoder.java,
java/net/URLStreamHandler.java,
java/net/URLStreamHandlerFactory.java,
java/net/UnknownHostException.java,
java/net/UnknownServiceException.java:
Fixed javadocs, coding style and argument names all over.
From-SVN: r80900
2004-04-20 15:05:10 +02:00
|
|
|
public static synchronized void setSocketFactory(SocketImplFactory fac)
|
1999-04-07 16:42:40 +02:00
|
|
|
throws IOException
|
|
|
|
{
|
|
|
|
factory = fac;
|
|
|
|
}
|
|
|
|
}
|