text: public BytesRef Next(){if (outerInstance.done){return null;}if (isFirstLine){isFirstLine = false;return spare;}outerInstance.line = outerInstance.@in.ReadLine();if (outerInstance.line != null){string[] fields = outerInstance.line.Split(new string[] { outerInstance.fieldDelimiter }, StringSplitOptions.RemoveEmptyEntries);if (fields.Length > 3){throw new System.ArgumentException("More than 3 fields in one line");} else if (fields.Length == 3){spare.CopyChars(fields[0]);ReadWeight(fields[1]);if (hasPayloads){curPayload.CopyChars(fields[2]);}} else if (fields.Length == 2){spare.CopyChars(fields[0]);ReadWeight(fields[1]);if (hasPayloads) {curPayload = new BytesRef();}} else{spare.CopyChars(fields[0]);curWeight = 1;if (hasPayloads){curPayload = new BytesRef();}}return spare;}else{outerInstance.done = true;IOUtils.Dispose(outerInstance.@in);return null;}}