Show / Hide Table of Contents

    Class BufferedIndexInput

    Base implementation class for buffered IndexInput.

    Inheritance
    System.Object
    DataInput
    IndexInput
    BufferedIndexInput
    NIOFSDirectory.NIOFSIndexInput
    SimpleFSDirectory.SimpleFSIndexInput
    Implements
    IDisposable
    Inherited Members
    IndexInput.Dispose()
    IndexInput.Dispose(Boolean)
    IndexInput.Length
    IndexInput.ToString()
    DataInput.ReadString()
    DataInput.ReadStringStringMap()
    DataInput.ReadStringSet()
    DataInput.SkipBytes(Int64)
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class BufferedIndexInput : IndexInput, IDisposable

    Constructors

    | Improve this Doc View Source

    BufferedIndexInput(String)

    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

    BufferedIndexInput(String, Int32)

    Inits BufferedIndexInput with a specific bufferSize

    Declaration
    public BufferedIndexInput(string resourceDesc, int bufferSize)
    Parameters
    Type Name Description
    System.String resourceDesc
    System.Int32 bufferSize

    Fields

    | Improve this Doc View Source

    BUFFER_SIZE

    Default buffer size set to BUFFER_SIZE.

    Declaration
    public const int BUFFER_SIZE = null
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    m_buffer

    Declaration
    protected byte[] m_buffer
    Field Value
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    MERGE_BUFFER_SIZE

    A buffer size for merges set to MERGE_BUFFER_SIZE.

    Declaration
    public const int MERGE_BUFFER_SIZE = null
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    BufferSize

    Returns buffer size.

    Declaration
    public int BufferSize { get; }
    Property Value
    Type Description
    System.Int32
    See Also
    SetBufferSize(Int32)

    Methods

    | Improve this Doc View Source

    Clone()

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object
    Overrides
    IndexInput.Clone()
    | Improve this Doc View Source

    FlushBuffer(IndexOutput, Int64)

    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
    Type Name Description
    IOContext context
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetFilePointer()

    Declaration
    public override sealed long GetFilePointer()
    Returns
    Type Description
    System.Int64
    Overrides
    IndexInput.GetFilePointer()
    | Improve this Doc View Source

    NewBuffer(Byte[])

    Declaration
    protected virtual void NewBuffer(byte[] newBuffer)
    Parameters
    Type Name Description
    System.Byte[] newBuffer
    | Improve this Doc View Source

    ReadByte()

    Declaration
    public override sealed byte ReadByte()
    Returns
    Type Description
    System.Byte
    Overrides
    DataInput.ReadByte()
    | Improve this Doc View Source

    ReadBytes(Byte[], Int32, Int32)

    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
    DataInput.ReadBytes(Byte[], Int32, Int32)
    | Improve this Doc View Source

    ReadBytes(Byte[], Int32, Int32, Boolean)

    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
    DataInput.ReadBytes(Byte[], Int32, Int32, Boolean)
    | Improve this Doc View Source

    ReadInt16()

    NOTE: this was readShort() in Lucene

    Declaration
    public override sealed short ReadInt16()
    Returns
    Type Description
    System.Int16
    Overrides
    DataInput.ReadInt16()
    | Improve this Doc View Source

    ReadInt32()

    NOTE: this was readInt() in Lucene

    Declaration
    public override sealed int ReadInt32()
    Returns
    Type Description
    System.Int32
    Overrides
    DataInput.ReadInt32()
    | Improve this Doc View Source

    ReadInt64()

    NOTE: this was readLong() in Lucene

    Declaration
    public override sealed long ReadInt64()
    Returns
    Type Description
    System.Int64
    Overrides
    DataInput.ReadInt64()
    | Improve this Doc View Source

    ReadInternal(Byte[], Int32, Int32)

    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

    ReadVInt32()

    NOTE: this was readVInt() in Lucene

    Declaration
    public override sealed int ReadVInt32()
    Returns
    Type Description
    System.Int32
    Overrides
    DataInput.ReadVInt32()
    | Improve this Doc View Source

    ReadVInt64()

    NOTE: this was readVLong() in Lucene

    Declaration
    public override sealed long ReadVInt64()
    Returns
    Type Description
    System.Int64
    Overrides
    DataInput.ReadVInt64()
    | Improve this Doc View Source

    Seek(Int64)

    Declaration
    public override sealed void Seek(long pos)
    Parameters
    Type Name Description
    System.Int64 pos
    Overrides
    IndexInput.Seek(Int64)
    | Improve this Doc View Source

    SeekInternal(Int64)

    Expert: implements seek. Sets current position in this file, where the next ReadInternal(Byte[], Int32, Int32) will occur.

    Declaration
    protected abstract void SeekInternal(long pos)
    Parameters
    Type Name Description
    System.Int64 pos
    See Also
    ReadInternal(Byte[], Int32, Int32)
    | Improve this Doc View Source

    SetBufferSize(Int32)

    Change the buffer size used by this IndexInput

    Declaration
    public void SetBufferSize(int newSize)
    Parameters
    Type Name Description
    System.Int32 newSize

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)