public WebFile( String urlString )
	throws java.io.IOException,java.net.UnknownServiceException,java.net.SocketTimeoutException {
		// Open a URL connection.
		final java.net.URL url = new java.net.URL( urlString );
		final java.net.URLConnection uconn = url.openConnection( );
		if ( !(uconn instanceof java.net.HttpURLConnection) )
			throw new java.lang.IllegalArgumentException(
					"URL protocol must be HTTP." );
		final java.net.HttpURLConnection conn =
			(java.net.HttpURLConnection)uconn;

		// Set up a request.
		conn.setConnectTimeout( 10000 );    // 10 sec
		conn.setReadTimeout( 10000 );       // 10 sec
		conn.setInstanceFollowRedirects( true );
		conn.setRequestProperty( "User-agent", "ich" );

		// Send the request.
		conn.connect( );

		// Get the response.
		responseHeader    = conn.getHeaderFields( );
		responseCode      = conn.getResponseCode( );
		responseURL       = conn.getURL( );
		final int length  = conn.getContentLength( );
		final String type = conn.getContentType( );
		if ( type != null ) {
			final String[] parts = type.split( ";" );
			MIMEtype = parts[0].trim( );
			for ( int i = 1; i < parts.length && charset == null; i++ ) {
				final String t  = parts[i].trim( );
				final int index = t.toLowerCase( ).indexOf( "charset=" );
				if ( index != -1 )
					charset = t.substring( index+8 );
			}
		}

		// Get the content.
		final java.io.InputStream stream = conn.getErrorStream( );
		if ( stream != null )
			content = readStream( length, stream );
		else if ( (content = conn.getContent( )) != null &&
				content instanceof java.io.InputStream )
			content = readStream( length, (java.io.InputStream)content );
		conn.disconnect( );
	}