question: protected void digestWarFile ( String hashAlg , Properties digestResult , JarFile wfile , boolean intoJar ) { Enumeration wEnum = wfile . entries ( ) ; byte [ ] digestCode = null ; String wename = null ; InputStream in = null ; try { while ( wEnum . hasMoreElements ( ) ) { JarEntry we = ( JarEntry ) wEnum . nextElement ( ) ; if ( ! we . isDirectory ( ) ) { wename = we . getName ( ) ; if ( wename . endsWith ( JAR_FILE_EXT ) && ( intoJar ) ) { in = wfile . getInputStream ( we ) ; digestCode = digestJarFile ( hashAlg , in ) ; in . close ( ) ; } else { in = wfile . getInputStream ( we ) ; digestCode = Utils . getHash ( hashAlg , in ) ; in . close ( ) ; } appendResult ( digestResult , wename , digestCode ) ; } } } catch ( IOException ex ) { ex . printStackTrace ( ) ; } finally { if ( in != null ) { try { in . close ( ) ; } catch ( IOException ignored ) { } in = null ; } } }
target:  This function calculate the hash value of a war file. This function will calculate the manifest according to the decompressed files contained in the war file.