text: public BlockTermsWriter(TermsIndexWriterBase termsIndexWriter,SegmentWriteState state, PostingsWriterBase postingsWriter){string termsFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, TERMS_EXTENSION);this.termsIndexWriter = termsIndexWriter;m_output = state.Directory.CreateOutput(termsFileName, state.Context);bool success = false;try{fieldInfos = state.FieldInfos;WriteHeader(m_output);currentField = null;this.postingsWriter = postingsWriter;postingsWriter.Init(m_output); success = true;}finally{if (!success){IOUtils.DisposeWhileHandlingException(m_output);}}}