本文整理汇总了C#中Lucene.Net.Store.IndexInput.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# IndexInput.Clone方法的具体用法?C# IndexInput.Clone怎么用?C# IndexInput.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Store.IndexInput
的用法示例。
在下文中一共展示了IndexInput.Clone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOrdIndexInstance
protected override MonotonicBlockPackedReader GetOrdIndexInstance(IndexInput data, FieldInfo field,
NumericEntry entry)
{
data.Seek(entry.Offset);
return new MonotonicBlockPackedReader((IndexInput)data.Clone(), entry.PackedIntsVersion, entry.BlockSize, entry.Count,
true);
}
示例2: GetAddressInstance
protected override MonotonicBlockPackedReader GetAddressInstance(IndexInput data, FieldInfo field,
BinaryEntry bytes)
{
data.Seek(bytes.AddressesOffset);
return new MonotonicBlockPackedReader((IndexInput)data.Clone(), bytes.PackedIntsVersion, bytes.BlockSize, bytes.Count,
true);
}
示例3: ChecksumEntireFile
/// <summary>
/// Clones the provided input, reads all bytes from the file, and calls <seealso cref="#checkFooter"/>
/// <p>
/// Note that this method may be slow, as it must process the entire file.
/// If you just need to extract the checksum value, call <seealso cref="#retrieveChecksum"/>.
/// </summary>
public static long ChecksumEntireFile(IndexInput input)
{
IndexInput clone = (IndexInput)input.Clone();
clone.Seek(0);
ChecksumIndexInput @in = new BufferedChecksumIndexInput(clone);
Debug.Assert(@in.FilePointer == 0);
@in.Seek(@in.Length() - FooterLength());
return CheckFooter(@in);
}
示例4: SlicedIndexInput
internal SlicedIndexInput(string sliceDescription, IndexInput @base, long fileOffset, long length, int readBufferSize)
: base("SlicedIndexInput(" + sliceDescription + " in " + @base + " slice=" + fileOffset + ":" + (fileOffset + length) + ")", readBufferSize)
{
[email protected] = (IndexInput)@base.Clone();
this.FileOffset = fileOffset;
this.Length_Renamed = length;
}