FormatDetails res = new FormatDetails();
res.capabilities = "unknown";
res.genericName = "unknown";
IndexInput in = dir.openInput(segmentsFile, IOContext.READ);
try {
int indexFormat = in.readInt();
if (indexFormat == CodecUtil.CODEC_MAGIC) {
res.genericName = "Lucene 4.x";
res.capabilities = "flexible, codec-specific";
int actualVersion = SegmentInfos.VERSION_40;
try {