@Override
    public final SortableFeature next() {
      SortableFeature current = next;
      if (current == null) {
        throw new NoSuchElementException();
      }
      if ((next = readNextFeature()) == null) {
        close();
      }
      return current;
    }
Common functionality between {@link ReaderMmap} and {@link ReaderBuffered}.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ExternalMergeSort.java