code: public static String sha1(URL url) {
  		InputStream is = null;
  		try {
  			is = url.openStream();
  			return sha1(is);
  		} catch (IOException ioe) {
  			log.warn("Error occourred while reading from URL: " + url, ioe);
  			throw new RuntimeIOException(ioe);
  		} finally {
  			if (is != null) {
  				try {
  					is.close();
  				} catch (IOException ioe) {
  					log.warn("Failed to close stream for URL: " + url, ioe);
  					throw new RuntimeIOException(ioe);
  				}
  			}
  		}
  	}
docs: Calculates SHA1 for the contents referred to by the supplied URL.
  
  @param url URL
  @return String with SHA1 calculated from the contents referred to by <code>url</code>.
  
  @throws RuntimeIOException