protected static class

SimpleFSDirectory.SimpleFSIndexOutput

extends BufferedIndexOutput
java.lang.Object
   ↳ org.apache.lucene.store.IndexOutput
     ↳ org.apache.lucene.store.BufferedIndexOutput
       ↳ org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexOutput

Summary

Public Constructors
SimpleFSDirectory.SimpleFSIndexOutput(File path)
Public Methods
void close()
Closes this stream to further operations.
void flushBuffer(byte[] b, int offset, int size)
output methods:
long length()
The number of bytes in the file.
void seek(long pos)
Random-access methods
void setLength(long length)
Set the file length.
[Expand]
Inherited Methods
From class org.apache.lucene.store.BufferedIndexOutput
From class org.apache.lucene.store.IndexOutput
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public SimpleFSDirectory.SimpleFSIndexOutput (File path)

Throws
IOException

Public Methods

public void close ()

Closes this stream to further operations.

Throws
IOException

public void flushBuffer (byte[] b, int offset, int size)

output methods:

Parameters
b the bytes to write
offset the offset in the byte array
size the number of bytes to write
Throws
IOException

public long length ()

The number of bytes in the file.

Throws
IOException

public void seek (long pos)

Random-access methods

Throws
IOException

public void setLength (long length)

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.

Parameters
length file length
Throws
IOException