public IndexInput openInput(String name, IOContext context) throws IOException {ensureOpen();final String id = IndexFileNames.stripSegmentName(name);final FileEntry entry = entries.get(id);if (entry == null) {String datFileName = IndexFileNames.segmentFileName(segmentName, "", Lucene50CompoundFormat.DATA_EXTENSION);throw new FileNotFoundException("No sub-file with id " + id + " found in compound file \"" + datFileName + "\" (fileName=" + name + " files: " + entries.keySet() + ")");}return handle.slice(name, entry.offset, entry.length);}

public override IndexInput OpenInput(string name, IOContext context){lock (this){EnsureOpen();Debug.Assert(!openForWrite);string id = IndexFileNames.StripSegmentName(name);if (!entries.TryGetValue(id, out FileEntry entry) || entry == null){throw new FileNotFoundException("No sub-file with id " + id +" found (fileName=" + name + " files: " +string.Format(J2N.Text.StringFormatter.InvariantCulture, "{0}", entries.Keys) + ")");}return handle.OpenSlice(name, entry.Offset, entry.Length);}}
