Apache Lucene.Net 2.4.0 Class Library API

IndexOutput.SetLength Method 

Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see 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. file length

public virtual void SetLength(
   long length
);

See Also

IndexOutput Class | Lucene.Net.Store Namespace