public int nextPosition() throws IOException {if (doc != 0) {throw new IllegalStateException();} else if (i >= termFreq - 1) {throw new IllegalStateException("Read past last position");}++i;if (payloadIndex != null) {payload.offset = basePayloadOffset + payloadIndex[positionIndex + i];payload.length = payloadIndex[positionIndex + i + 1] - payloadIndex[positionIndex + i];}if (positions == null) {return -1;} else {return positions[positionIndex + i];}}

public override int NextPosition(){if (doc != 0){throw new Exception();}else if (i >= termFreq - 1){throw new Exception("Read past last position");}++i;if (payloadIndex != null){payload.Offset = basePayloadOffset + payloadIndex[positionIndex + i];payload.Length = payloadIndex[positionIndex + i + 1] - payloadIndex[positionIndex + i];}if (positions == null){return -1;}else{return positions[positionIndex + i];}}
