Code example for MessageDigest

Methods: reset

0
		public XarInputStream(XarEntry entry, InputStream input) {
			_entry = entry;
			_delegate = input;
			if (_entry.hasChecksum()) {
				_digest = _entry.getMessageDigest(getCksumName());
				_digest.reset();
			} else { 
				_digest = null;
			} 
		} 
		 
		@Override 
		public int read() throws IOException { 
			int result = _delegate.read();
			if (result == -1) {
				if (!validChecksum()) { 
					throw new XarException("invalid checksum"); 
				} 
				return result;
			} 
Experience pair programming with AI  Get Codota for Java