Code example for MessageDigest

Methods: reset

0
  /** 
   * Clean up checksum and delete the temporary file. 
   */ 
  private void cleanUp() { 
    // Discard checksum. 
    checksum.reset();
 
    // Clean up files. 
    if (tmpFile != null && tmpFile.exists()) {
      tmpFile.delete();
    } 
    tmpFile = null;
  } 
 
  /** 
   * Log message and error and clean up, then rethrow exception to caller. 
   * 
   * @param message 
   *          Error message 
   * @param e 
   *          Exception