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
| Improve this Doc View SourceChecksum
Returns the current checksum of bytes written so far
Declaration
public abstract long Checksum { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
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 |
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 |
---|---|
System.Int64 |
See Also
Methods
| Improve this Doc View SourceDispose()
Closes this stream to further operations.
Declaration
public void Dispose()
Dispose(Boolean)
Closes this stream to further operations.
Declaration
protected abstract void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Flush()
Forces any buffered output to be written.
Declaration
public abstract void Flush()
Seek(Int64)
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 |
---|---|---|
System.Int64 | pos |