public final void write(byte[] b, int off, int len)throws IOException {while (0 < len) {final int n = Math.min(len, BYTES_TO_WRITE_BEFORE_CANCEL_CHECK);count += n;if (checkCancelAt <= count) {if (writeMonitor.isCancelled()) {throw new IOException(JGitText.get().packingCancelledDuringObjectsWriting);}checkCancelAt = count + BYTES_TO_WRITE_BEFORE_CANCEL_CHECK;}out.write(b, off, n);md.update(b, off, n);off += n;len -= n;}}
public override void Write(byte[] b, int off, int len){while (0 < len){int n = Math.Min(len, BYTES_TO_WRITE_BEFORE_CANCEL_CHECK);count += n;if (checkCancelAt <= count){if (writeMonitor.IsCancelled()){throw new IOException(JGitText.Get().packingCancelledDuringObjectsWriting);}checkCancelAt = count + BYTES_TO_WRITE_BEFORE_CANCEL_CHECK;}@out.Write(b, off, n);crc.Update(b, off, n);md.Update(b, off, n);off += n;len -= n;}}