Fork me on GitHub
  • API

    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
    object
    DataOutput
    IndexOutput
    BufferedIndexOutput
    RAMOutputStream
    Implements
    IDisposable
    Inherited Members
    DataOutput.WriteByte(byte)
    DataOutput.WriteBytes(byte[], int)
    DataOutput.WriteBytes(byte[], int, int)
    DataOutput.WriteInt32(int)
    DataOutput.WriteInt16(short)
    DataOutput.WriteVInt32(int)
    DataOutput.WriteInt64(long)
    DataOutput.WriteVInt64(long)
    DataOutput.WriteString(string)
    DataOutput.CopyBytes(DataInput, long)
    DataOutput.WriteStringStringMap(IDictionary<string, string>)
    DataOutput.WriteStringSet(ISet<string>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class IndexOutput : DataOutput, IDisposable

    Properties

    Checksum

    Returns the current checksum of bytes written so far

    Declaration
    public abstract long Checksum { get; }
    Property Value
    Type Description
    long
    See Also
    Directory
    IndexInput

    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
    long
    See Also
    Directory
    IndexInput

    Position

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

    This was getFilePointer() in Lucene.
    Declaration
    public abstract long Position { get; }
    Property Value
    Type Description
    long
    See Also
    Seek(long)

    Methods

    Dispose()

    Closes this stream to further operations.

    Declaration
    public void Dispose()
    See Also
    Directory
    IndexInput

    Dispose(bool)

    Closes this stream to further operations.

    Declaration
    protected abstract void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    See Also
    Directory
    IndexInput

    Flush()

    Forces any buffered output to be written.

    Declaration
    public abstract void Flush()
    See Also
    Directory
    IndexInput

    Seek(long)

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

    Declaration
    [Obsolete("(4.1) this method will be removed in Lucene 5.0")]
    public abstract void Seek(long pos)
    Parameters
    Type Name Description
    long pos
    See Also
    Position

    Implements

    IDisposable

    See Also

    Directory
    IndexInput
    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.