Lucene.Net.Store.MockRAMDirectory.OpenInput C# (CSharp) Method

OpenInput() public method

public OpenInput ( String name ) : IndexInput
name String
return IndexInput
        public override IndexInput OpenInput(String name)
        {
            lock (this)
            {
                RAMFile file = fileMap[name];
                if (file == null)
                    throw new System.IO.FileNotFoundException(name);
                else
                {
                    if (openFiles.ContainsKey(name))
                    {
                        int v = openFiles[name]; 
                        v = v + 1;
                        openFiles[name] = v;
                    }
                    else
                    {
                        openFiles[name] = 1;
                    }
                }
                return new MockRAMInputStream(this, name, file);
            }
        }