I think it's right to do network development setSoTimeout This method is very familiar , Know is the timeout event set . But many people think this is the timeout time for setting the link , But check the documentation for a description of this method :

HttpConnectionParams:
Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the
timeoutfor waiting for data.
A timeout value of zero is interpreted as an infinite timeout. This value is
used when no socket timeout is setin the method parameters.
Socket:
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With
this option set to a non-zero timeout,
a read() call on the InputStream associated with this Socket will block for
only this amount oftime. If the timeout expires,
a java.net.SocketTimeoutException is raised, though the Socket is still valid.
The option must be enabled prior to entering the blocking operation to have
effect.
The timeout must be > 0. A timeout of zero is interpreted as an infinite
timeout.
DatagramSocket:
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With
this option set to a non-zero timeout,
a call to receive() for this DatagramSocket will block for only this amount of
time. If the timeout expires, a java.net.SocketTimeoutException is raised,
though the DatagramSocket is still valid. The option must be enabled prior to
entering the blocking operation to have effect.
The timeout must be > 0. A timeout of zero is interpreted as an infinite
timeout.
See the detailed description of the document , Obviously , This understanding is wrong , Is not a link timeout . In a nutshell , Should be : Timeout to block link while reading data .

above Socket Of setSoTimeout The translated content of :
setSoTimeout public void setSoTimeout(int timeout) throws SocketException Enable /
Disable with specified timeout value SO_TIMEOUT, In Milliseconds . When this option is set to a non-zero timeout value , In relation to Socket Associated InputStream Call up
read() Only this length of time will be blocked . If the timeout value is exceeded , Will trigger java.net.SocketTimeoutException, although Socket
Still valid . Option must be enabled before entering blocking operation to take effect . Timeout value must be > 0 Of . The timeout value is 0 Interpreted as infinite timeout . parameter : timeout -
Specified timeout in milliseconds . Throw : SocketException- If there is an error in the underlying protocol , for example TCP error .
The easiest way to test and verify :

Write one based on Socket Download method of , set up setSoTimeout after , Download a large file , Will find out , Download time exceeds setSoTimeout After the value of , Will fail !!