public static InputStream getInputStreamHttp(final String pURL, final Properties pProperties, final boolean pFollowRedirects, final int pTimeout)
            throws IOException {

        // Make sure we have properties
        Properties properties = pProperties != null ? pProperties : new Properties();

        //URL url = getURLAndRegisterPassword(pURL);
        URL url = getURLAndSetAuthorization(pURL, properties);

        //unregisterPassword(url);
        return getInputStreamHttp(url, properties, pFollowRedirects, pTimeout);
    }
public static InputStream getInputStreamHttp ( final String pURL , final Properties pProperties , final boolean pFollowRedirects , final int pTimeout ) throws IOException { Properties properties = pProperties != null ? pProperties : new Properties ( ) ; URL url = getURLAndSetAuthorization ( pURL , properties ) ; return getInputStreamHttp ( url , properties , pFollowRedirects , pTimeout ) ; }
Gets the InputStream from a given URL, with the given timeout.
The timeout must be > 0. A timeout of zero is interpreted as an
infinite timeout. Supports basic HTTP
authentication, using a URL string similar to most browsers.
<P/>
<SMALL>Implementation note: If the timeout parameter is greater than 0,
this method uses my own implementation of
java.net.HttpURLConnection, that uses plain sockets, to create an
HTTP connection to the given URL. The {@code read} methods called
on the returned InputStream, will block only for the specified timeout.
If the timeout expires, a java.io.InterruptedIOException is raised. This
might happen BEFORE OR AFTER this method returns, as the HTTP headers
will be read and parsed from the InputStream before this method returns,
while further read operations on the returned InputStream might be
performed at a later stage.
<BR/>
</SMALL>

@param pURL             the URL to get.
@param pProperties      the request header properties.
@param pFollowRedirects specifying wether redirects should be followed.
@param pTimeout         the specified timeout, in milliseconds.
@return an input stream that reads from the socket connection, created
from the given URL.
@throws MalformedURLException if the url parameter specifies an
unknown protocol, or does not form a valid URL.
@throws UnknownHostException  if the IP address for the given URL cannot
be resolved.
@throws FileNotFoundException if there is no file at the given URL.
@throws IOException           if an error occurs during transfer.
@see #getInputStreamHttp(URL,int)
@see java.net.Socket
@see java.net.Socket#setSoTimeout(int) setSoTimeout
@see java.io.InterruptedIOException
@see <A href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">RFC 2616</A>