question: private long computeInterfaceHash ( ) { long hash = 0 ; ByteArrayOutputStream sink = new ByteArrayOutputStream ( 512 ) ; try { MessageDigest md = MessageDigest . getInstance ( "SHA" ) ; DataOutputStream out = new DataOutputStream ( new DigestOutputStream ( sink , md ) ) ; out . writeInt ( INTERFACE_HASH_STUB_VERSION ) ; for ( Method method : remoteMethods ) { MethodDoc methodDoc = method . methodDoc ( ) ; out . writeUTF ( methodDoc . name ( ) ) ; out . writeUTF ( Util . methodDescriptorOf ( methodDoc ) ) ; ClassDoc exceptions [ ] = methodDoc . thrownExceptions ( ) ; Arrays . sort ( exceptions , new ClassDocComparator ( ) ) ; for ( ClassDoc ex : exceptions ) { out . writeUTF ( Util . binaryNameOf ( ex ) ) ; } } out . flush ( ) ; byte hashArray [ ] = md . digest ( ) ; for ( int i = 0 ; i < Math . min ( 8 , hashArray . length ) ; i ++ ) { hash += ( ( long ) ( hashArray [ i ] & 0xFF ) ) << ( i * 8 ) ; } } catch ( IOException e ) { throw new AssertionError ( e ) ; } catch ( NoSuchAlgorithmException e ) { throw new AssertionError ( e ) ; } return hash ; }
target:  Computes the "interface hash" of the stub/skeleton pair for this remote implementation class.  This is the 64-bit value used to enforce compatibility between a stub class and a skeleton class in the JDK 1.1 version of the JRMP stub/skeleton protocol. It is calculated using the first 64 bits of an SHA digest.  The digest is of a stream consisting of the following data: (int) stub version number, always 1 for each remote method, in order of operation number: (UTF-8) method name (UTF-8) method descriptor for each declared exception, in alphabetical name order: (UTF-8) name of exception class (where "UTF-8" includes a 16-bit length prefix as written by java.io.DataOutput.writeUTF).