CodecUtil.writeHeader(output, Blur022SegmentInfoFormat.CODEC_NAME, Blur022SegmentInfoFormat.VERSION_CURRENT);
output.writeString(si.getVersion());
output.writeInt(si.getDocCount());
output.writeByte((byte) (si.getUseCompoundFile() ? SegmentInfo.YES : SegmentInfo.NO));
output.writeStringStringMap(si.getDiagnostics());
Map<String, String> attributes = si.attributes();
TreeMap<String, String> newAttributes = new TreeMap<String, String>();
if (attributes != null) {
newAttributes.putAll(attributes);
}