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 ) ; } } } }
Calculates SHA1 for the contents referred to by the supplied URL .