internal virtual void WriteSequence() { Debug.Assert(SequenceIsConsistent()); try { WriteHeader(reverse, clean, dirtyWords.Length); } catch (System.IO.IOException cannotHappen) { throw new InvalidOperationException(cannotHappen.ToString(), cannotHappen); // LUCENENET NOTE: This was AssertionError in Lucene } @out.WriteBytes(dirtyWords.Bytes, 0, dirtyWords.Length); dirtyWords.Length = 0; ++numSequences; }
internal virtual void WriteSequence() { Debug.Assert(SequenceIsConsistent()); try { WriteHeader(Reverse, Clean, DirtyWords.Length); } catch (System.IO.IOException cannotHappen) { throw new InvalidOperationException(cannotHappen.ToString(), cannotHappen); } @out.WriteBytes(DirtyWords.Bytes, 0, DirtyWords.Length); DirtyWords.Length = 0; ++NumSequences; }
internal virtual void WriteSequence() { if (Debugging.AssertsEnabled) { Debugging.Assert(SequenceIsConsistent()); } try { WriteHeader(reverse, clean, dirtyWords.Length); } catch (Exception cannotHappen) when(cannotHappen.IsIOException()) { throw AssertionError.Create(cannotHappen.Message, cannotHappen); } @out.WriteBytes(dirtyWords.Bytes, 0, dirtyWords.Length); dirtyWords.Length = 0; ++numSequences; }