/// <summary> /// The open input. /// </summary> /// <param name="name"> /// The name. /// </param> /// <returns> /// The <see cref="IndexInput"/>. /// </returns> /// <exception cref="FileNotFoundException"> /// File Not Found Exception /// </exception> public override IndexInput OpenInput(string name) { var record = this.GetRecord(name); if (!record.Exists) { // Lucene does not check whether file exists. It expects FileNotFoundException throw new FileNotFoundException("File not found", name); } IBufferedPageReader reader = this.GetReaderWriter(record, true); return(new EncryptedIndexInput(reader)); }
/// <summary> /// Initializes a new instance of the <see cref="EncryptedIndexInput"/> class. /// </summary> /// <param name="reader"> /// The reader. /// </param> public EncryptedIndexInput(IBufferedPageReader reader) { this.reader = reader; }