Package org.apache.maven.index.updater
Class IndexDataWriter
- java.lang.Object
-
- org.apache.maven.index.updater.IndexDataWriter
-
public class IndexDataWriter extends java.lang.Object
An index data writer used to write transfer index format.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.lang.String>
allGroups
private java.io.BufferedOutputStream
bos
private boolean
descriptorWritten
private java.io.DataOutputStream
dos
(package private) static int
F_COMPRESSED
(package private) static int
F_INDEXED
(package private) static int
F_STORED
(package private) static int
F_TOKENIZED
private java.util.zip.GZIPOutputStream
gos
private java.util.Set<java.lang.String>
rootGroups
(package private) static int
VERSION
-
Constructor Summary
Constructors Constructor Description IndexDataWriter(java.io.OutputStream os)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
write(IndexingContext context, org.apache.lucene.index.IndexReader indexReader, java.util.List<java.lang.Integer> docIndexes)
boolean
writeDocument(org.apache.lucene.document.Document document)
void
writeDocumentFields(java.util.List<org.apache.lucene.index.IndexableField> fields)
int
writeDocuments(org.apache.lucene.index.IndexReader r, java.util.List<java.lang.Integer> docIndexes)
void
writeField(org.apache.lucene.index.IndexableField field)
void
writeGroupFields()
void
writeHeader(IndexingContext context)
private static void
writeUTF(java.lang.String str, java.io.DataOutput out)
-
-
-
Field Detail
-
VERSION
static final int VERSION
- See Also:
- Constant Field Values
-
F_INDEXED
static final int F_INDEXED
- See Also:
- Constant Field Values
-
F_TOKENIZED
static final int F_TOKENIZED
- See Also:
- Constant Field Values
-
F_STORED
static final int F_STORED
- See Also:
- Constant Field Values
-
F_COMPRESSED
static final int F_COMPRESSED
- See Also:
- Constant Field Values
-
dos
private final java.io.DataOutputStream dos
-
gos
private final java.util.zip.GZIPOutputStream gos
-
bos
private final java.io.BufferedOutputStream bos
-
allGroups
private final java.util.Set<java.lang.String> allGroups
-
rootGroups
private final java.util.Set<java.lang.String> rootGroups
-
descriptorWritten
private boolean descriptorWritten
-
-
Method Detail
-
write
public int write(IndexingContext context, org.apache.lucene.index.IndexReader indexReader, java.util.List<java.lang.Integer> docIndexes) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
writeHeader
public void writeHeader(IndexingContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
writeGroupFields
public void writeGroupFields() throws java.io.IOException
- Throws:
java.io.IOException
-
writeDocuments
public int writeDocuments(org.apache.lucene.index.IndexReader r, java.util.List<java.lang.Integer> docIndexes) throws java.io.IOException
- Throws:
java.io.IOException
-
writeDocument
public boolean writeDocument(org.apache.lucene.document.Document document) throws java.io.IOException
- Throws:
java.io.IOException
-
writeDocumentFields
public void writeDocumentFields(java.util.List<org.apache.lucene.index.IndexableField> fields) throws java.io.IOException
- Throws:
java.io.IOException
-
writeField
public void writeField(org.apache.lucene.index.IndexableField field) throws java.io.IOException
- Throws:
java.io.IOException
-
writeUTF
private static void writeUTF(java.lang.String str, java.io.DataOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
-