code: public static String sha1(InputStream is) {
  		byte[] buf = new byte[1024*1024*5];
  		int bytesRead = 0;
  		MessageDigest md;
  		try {
  			md = MessageDigest.getInstance("SHA1");
  		} catch (NoSuchAlgorithmException nsae) {
  			throw new RuntimeIOException(nsae.getMessage(), nsae);
  		}
  		try {
  			while ((bytesRead = is.read(buf)) > 0) {
  				md.update(buf, 0, bytesRead);
  			}
  		} catch (IOException ioe) {
  			throw new RuntimeIOException(ioe.getMessage(), ioe);
  		}
  		byte[] digest = md.digest();
  		String hexDigest = new String(Hex.encodeHex(digest));
  		return hexDigest;
  	}
docs: Calculates SHA1 for the contents of the supplied InputStream.
  
  @param is InputStream
  @return String with SHA1 calculated from the contents of <code>is</code>.
  
  @throws RuntimeIOException