in jdk1.4java.net 
Interface SocketOptions
SO_TIMEOUT
public static final int SO_TIMEOUT
Set a timeout on blocking Socket operations: 
 ServerSocket.accept();
 SocketInputStream.read();
 DatagramSocket.receive();
 
The option must be set prior to entering a blocking operation to take effect. If the timeout expires and the operation would continue to block, java.io.InterruptedIOException is raised. The Socket is not closed in this case. Valid for all sockets: SocketImpl, DatagramSocketImpl 
See Also:
Socket.setSoTimeout(int), ServerSocket.setSoTimeout(int), DatagramSocket.setSoTimeout(int), Constant Field Values