@Override
  public KnownSizeRecordWriter writerFor(@NotNull K key,
                                         @Nullable V value) throws IOException {
    KnownSizeRecordWriter keyWriter = keyDescriptor.writerFor(key);
    int keySize = keyWriter.recordSize();
    if (keySize < 0) {
      throw new AssertionError("keySize(" + key + ")=" + keySize + ": must be strictly positive");
    }

    if (value == null) {
      return new NullValueEntryWriter(keyWriter);
    }
    else {
      KnownSizeRecordWriter valueWriter = valueExternalizer.writerFor(value);
      return new NonNullValueEntryWriter(keyWriter, valueWriter);
    }
  }
@Override
  public KnownSizeRecordWriter writerFor(@NotNull K key,
                                         @Nullable V value)