Class MockIndexInputWrapper
Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been disposed.
Implements
Inherited Members
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
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
See Also
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
Dispose(bool)
Closes the stream to further operations.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
ReadByte()
Reads and returns a single byte.
Declaration
public override byte ReadByte()
Returns
Type | Description |
---|---|
byte |
Overrides
See Also
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
See Also
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
See Also
ReadInt16()
NOTE: this was readShort() in Lucene
Declaration
public override short ReadInt16()
Returns
Type | Description |
---|---|
short |
Overrides
ReadInt32()
NOTE: this was readInt() in Lucene
Declaration
public override int ReadInt32()
Returns
Type | Description |
---|---|
int |
Overrides
ReadInt64()
NOTE: this was readLong() in Lucene
Declaration
public override long ReadInt64()
Returns
Type | Description |
---|---|
long |
Overrides
ReadString()
Reads a string.
Declaration
public override string ReadString()
Returns
Type | Description |
---|---|
string |
Overrides
See Also
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
ReadVInt32()
NOTE: this was readVInt() in Lucene
Declaration
public override int ReadVInt32()
Returns
Type | Description |
---|---|
int |
Overrides
ReadVInt64()
NOTE: this was readVLong() in Lucene
Declaration
public override long ReadVInt64()
Returns
Type | Description |
---|---|
long |
Overrides
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
See Also
ToString()
Returns the resourceDescription that was passed into the constructor.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |