Show / Hide Table of Contents

    Class IndexOutput

    Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.

    IndexOutput may only be used from one thread, because it is not thread safe (it keeps internal state like file position).

    Inheritance
    System.Object
    DataOutput
    IndexOutput
    BufferedIndexOutput
    RAMOutputStream
    Implements
    IDisposable
    Inherited Members
    DataOutput.WriteByte(Byte)
    DataOutput.WriteBytes(Byte[], Int32)
    DataOutput.WriteBytes(Byte[], Int32, Int32)
    DataOutput.WriteInt32(Int32)
    DataOutput.WriteInt16(Int16)
    DataOutput.WriteVInt32(Int32)
    DataOutput.WriteInt64(Int64)
    DataOutput.WriteVInt64(Int64)
    DataOutput.WriteString(String)
    DataOutput.CopyBytes(DataInput, Int64)
    DataOutput.WriteStringStringMap(IDictionary<String, String>)
    DataOutput.WriteStringSet(ISet<String>)
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class IndexOutput : DataOutput, IDisposable

    Properties

    | Improve this Doc View Source

    Checksum

    Returns the current checksum of bytes written so far

    Declaration
    public abstract long Checksum { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    Length

    Gets or Sets the file length. By default, this property's setter does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.

    Declaration
    public virtual long Length { get; set; }
    Property Value
    Type Description
    System.Int64

    Methods

    | Improve this Doc View Source

    Dispose()

    Closes this stream to further operations.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Closes this stream to further operations.

    Declaration
    protected abstract void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    | Improve this Doc View Source

    Flush()

    Forces any buffered output to be written.

    Declaration
    public abstract void Flush()
    | Improve this Doc View Source

    GetFilePointer()

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

    Declaration
    public abstract long GetFilePointer()
    Returns
    Type Description
    System.Int64
    See Also
    Seek(Int64)
    | Improve this Doc View Source

    Seek(Int64)

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

    Declaration
    public abstract void Seek(long pos)
    Parameters
    Type Name Description
    System.Int64 pos
    See Also
    GetFilePointer()

    Implements

    IDisposable

    See Also

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