Class BufferedIndexInput
Base implementation class for buffered IndexInput.
Inheritance
System.Object
BufferedIndexInput
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.dll
public abstract class BufferedIndexInput : IndexInput, IDisposable
Constructors
|
Improve this Doc
View Source
Declaration
public BufferedIndexInput(string resourceDesc)
Parameters
Type |
Name |
Description |
System.String |
resourceDesc |
|
|
Improve this Doc
View Source
BufferedIndexInput(String, IOContext)
Declaration
public BufferedIndexInput(string resourceDesc, IOContext context)
Parameters
Type |
Name |
Description |
System.String |
resourceDesc |
|
IOContext |
context |
|
|
Improve this Doc
View Source
Declaration
public BufferedIndexInput(string resourceDesc, int bufferSize)
Parameters
Type |
Name |
Description |
System.String |
resourceDesc |
|
System.Int32 |
bufferSize |
|
Fields
|
Improve this Doc
View Source
Declaration
public const int BUFFER_SIZE = 1024
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Declaration
protected byte[] m_buffer
Field Value
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
Declaration
public const int MERGE_BUFFER_SIZE = 4096
Field Value
Type |
Description |
System.Int32 |
|
Properties
|
Improve this Doc
View Source
Declaration
public int BufferSize { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Declaration
public override object Clone()
Returns
Type |
Description |
System.Object |
|
Overrides
|
Improve this Doc
View Source
Flushes the in-memory buffer to the given output, copying at most
numBytes
.
NOTE: this method does not refill the buffer, however it does
advance the buffer position.
Declaration
protected int FlushBuffer(IndexOutput out, long numBytes)
Parameters
Type |
Name |
Description |
IndexOutput |
out |
|
System.Int64 |
numBytes |
|
Returns
Type |
Description |
System.Int32 |
the number of bytes actually flushed from the in-memory buffer.
|
|
Improve this Doc
View Source
GetBufferSize(IOContext)
Returns default buffer sizes for the given IOContext
Declaration
public static int GetBufferSize(IOContext context)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public override sealed long GetFilePointer()
Returns
Type |
Description |
System.Int64 |
|
Overrides
|
Improve this Doc
View Source
Declaration
protected virtual void NewBuffer(byte[] newBuffer)
Parameters
Type |
Name |
Description |
System.Byte[] |
newBuffer |
|
|
Improve this Doc
View Source
Declaration
public override sealed byte ReadByte()
Returns
Type |
Description |
System.Byte |
|
Overrides
|
Improve this Doc
View Source
Declaration
public override sealed void ReadBytes(byte[] b, int offset, int len)
Parameters
Type |
Name |
Description |
System.Byte[] |
b |
|
System.Int32 |
offset |
|
System.Int32 |
len |
|
Overrides
|
Improve this Doc
View Source
Declaration
public override sealed void ReadBytes(byte[] b, int offset, int len, bool useBuffer)
Parameters
Type |
Name |
Description |
System.Byte[] |
b |
|
System.Int32 |
offset |
|
System.Int32 |
len |
|
System.Boolean |
useBuffer |
|
Overrides
|
Improve this Doc
View Source
NOTE: this was readShort() in Lucene
Declaration
public override sealed short ReadInt16()
Returns
Type |
Description |
System.Int16 |
|
Overrides
|
Improve this Doc
View Source
NOTE: this was readInt() in Lucene
Declaration
public override sealed int ReadInt32()
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
NOTE: this was readLong() in Lucene
Declaration
public override sealed long ReadInt64()
Returns
Type |
Description |
System.Int64 |
|
Overrides
|
Improve this Doc
View Source
Expert: implements buffer refill. Reads bytes from the current position
in the input.
Declaration
protected abstract void ReadInternal(byte[] b, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
b |
the array to read bytes into
|
System.Int32 |
offset |
the offset in the array to start storing bytes
|
System.Int32 |
length |
the number of bytes to read
|
|
Improve this Doc
View Source
NOTE: this was readVInt() in Lucene
Declaration
public override sealed int ReadVInt32()
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
NOTE: this was readVLong() in Lucene
Declaration
public override sealed long ReadVInt64()
Returns
Type |
Description |
System.Int64 |
|
Overrides
|
Improve this Doc
View Source
Declaration
public override sealed void Seek(long pos)
Parameters
Type |
Name |
Description |
System.Int64 |
pos |
|
Overrides
|
Improve this Doc
View Source
Declaration
protected abstract void SeekInternal(long pos)
Parameters
Type |
Name |
Description |
System.Int64 |
pos |
|
|
Improve this Doc
View Source
Declaration
public void SetBufferSize(int newSize)
Parameters
Type |
Name |
Description |
System.Int32 |
newSize |
|
Implements
System.IDisposable
Extension Methods