Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class MockIndexInputWrapper

    Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been disposed.

    Inheritance
    object
    DataInput
    IndexInput
    MockIndexInputWrapper
    Implements
    IDisposable
    Inherited Members
    IndexInput.Dispose()
    DataInput.ReadStringSet()
    DataInput.SkipBytes(long)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.TestFramework.dll
    Syntax
    public class MockIndexInputWrapper : IndexInput, IDisposable

    Constructors

    MockIndexInputWrapper(MockDirectoryWrapper, string, IndexInput)

    Construct an empty output buffer.

    Declaration
    public MockIndexInputWrapper(MockDirectoryWrapper dir, string name, IndexInput @delegate)
    Parameters
    Type Name Description
    MockDirectoryWrapper dir
    string name
    IndexInput delegate

    Properties

    Length

    The number of bytes in the file.

    Declaration
    public override long Length { get; }
    Property Value
    Type Description
    long
    Overrides
    Lucene.Net.Store.IndexInput.Length

    Position

    Returns the current position in this file, where the next read will occur.

    This was getFilePointer() in Lucene.
    Declaration
    public override long Position { get; }
    Property Value
    Type Description
    long
    Overrides
    Lucene.Net.Store.IndexInput.Position
    See Also
    Seek(long)

    Methods

    Clone()

    Returns a clone of this stream.

    Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

    Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

    Warning: Lucene never closes cloned Lucene.Net.Store.IndexInputs, it will only do this on the original one. The original instance must take care that cloned instances throw ObjectDisposedException when the original one is closed.
    Declaration
    public override object Clone()
    Returns
    Type Description
    object
    Overrides
    Lucene.Net.Store.IndexInput.Clone()

    Dispose(bool)

    Closes the stream to further operations.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    IndexInput.Dispose(bool)

    ReadByte()

    Reads and returns a single byte.

    Declaration
    public override byte ReadByte()
    Returns
    Type Description
    byte
    Overrides
    Lucene.Net.Store.DataInput.ReadByte()
    See Also
    WriteByte(byte)

    ReadBytes(byte[], int, int)

    Reads a specified number of bytes into an array at the specified offset.

    Declaration
    public override void ReadBytes(byte[] b, int offset, int len)
    Parameters
    Type Name Description
    byte[] b

    the array to read bytes into

    int offset

    the offset in the array to start storing bytes

    int len

    the number of bytes to read

    Overrides
    DataInput.ReadBytes(byte[], int, int)
    See Also
    WriteBytes(byte[], int)

    ReadBytes(byte[], int, int, bool)

    Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only Lucene.Net.Store.BufferedIndexInput respects this parameter.

    Declaration
    public override void ReadBytes(byte[] b, int offset, int len, bool useBuffer)
    Parameters
    Type Name Description
    byte[] b

    the array to read bytes into

    int offset

    the offset in the array to start storing bytes

    int len

    the number of bytes to read

    bool useBuffer

    set to false if the caller will handle buffering.

    Overrides
    DataInput.ReadBytes(byte[], int, int, bool)
    See Also
    WriteBytes(byte[], int)

    ReadInt16()

    NOTE: this was readShort() in Lucene

    Declaration
    public override short ReadInt16()
    Returns
    Type Description
    short
    Overrides
    Lucene.Net.Store.DataInput.ReadInt16()

    ReadInt32()

    NOTE: this was readInt() in Lucene

    Declaration
    public override int ReadInt32()
    Returns
    Type Description
    int
    Overrides
    Lucene.Net.Store.DataInput.ReadInt32()

    ReadInt64()

    NOTE: this was readLong() in Lucene

    Declaration
    public override long ReadInt64()
    Returns
    Type Description
    long
    Overrides
    Lucene.Net.Store.DataInput.ReadInt64()

    ReadString()

    Reads a string.

    Declaration
    public override string ReadString()
    Returns
    Type Description
    string
    Overrides
    Lucene.Net.Store.DataInput.ReadString()
    See Also
    WriteString(string)

    ReadStringStringMap()

    Reads a IDictionary<string,string> previously written with WriteStringStringMap(IDictionary<string, string>).

    Declaration
    public override IDictionary<string, string> ReadStringStringMap()
    Returns
    Type Description
    IDictionary<string, string>
    Overrides
    Lucene.Net.Store.DataInput.ReadStringStringMap()

    ReadVInt32()

    NOTE: this was readVInt() in Lucene

    Declaration
    public override int ReadVInt32()
    Returns
    Type Description
    int
    Overrides
    Lucene.Net.Store.DataInput.ReadVInt32()

    ReadVInt64()

    NOTE: this was readVLong() in Lucene

    Declaration
    public override long ReadVInt64()
    Returns
    Type Description
    long
    Overrides
    Lucene.Net.Store.DataInput.ReadVInt64()

    Seek(long)

    Sets current position in this file, where the next read will occur.

    Declaration
    public override void Seek(long pos)
    Parameters
    Type Name Description
    long pos
    Overrides
    IndexInput.Seek(long)
    See Also
    Position

    ToString()

    Returns the resourceDescription that was passed into the constructor.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    Lucene.Net.Store.IndexInput.ToString()

    Implements

    IDisposable
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.