public final class IndexWriter
extends java.lang.Object
Indexer
.
The IndexWriter operates on standard output streams, and also provides suitable buffering.
Thread-Safety
IndexWriter is not thread-safe and can not be shared between concurrent threads.Modifier and Type | Field and Description |
---|---|
private java.io.OutputStream |
out |
Constructor and Description |
---|
IndexWriter(java.io.OutputStream out)
Constructs an IndexWriter using the specified stream
|
Modifier and Type | Method and Description |
---|---|
private IndexWriterImpl |
getWriter(int version) |
int |
write(Index index)
Writes the specified index to the associated output stream.
|
int |
write(Index index,
byte version)
Deprecated.
|
int |
write(Index index,
int version)
Writes the specified index to the associated output stream.
|
public IndexWriter(java.io.OutputStream out)
out
- a stream to write an index topublic int write(Index index) throws java.io.IOException
index
- the index to write to the streamjava.io.IOException
- if the underlying stream fails@Deprecated public int write(Index index, byte version) throws java.io.IOException
index
- the index to write to the streamversion
- the index file versionjava.io.IOException
- if any i/o error occurspublic int write(Index index, int version) throws java.io.IOException
index
- the index to write to the streamversion
- the index file versionjava.io.IOException
- if any i/o error occursprivate IndexWriterImpl getWriter(int version)