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).Implements
Inherited Members
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
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
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
Methods
Dispose()
Closes this stream to further operations.
Declaration
public void Dispose()
See Also
Dispose(bool)
Closes this stream to further operations.
Declaration
protected abstract void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
See Also
Flush()
Forces any buffered output to be written.
Declaration
public abstract void Flush()
See Also
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 |