Package org.apache.maven.index.reader
Class ChunkWriter
java.lang.Object
org.apache.maven.index.reader.ChunkWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
Maven 2 Index published binary chunk writer, it writes raw Maven Indexer records to the transport binary format.
- Since:
- 5.1.2
-
Constructor Summary
ConstructorsConstructorDescriptionChunkWriter(String chunkName, OutputStream outputStream, int version, Date timestamp) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this reader and it's underlying input.getName()Returns the chunk name.Returns the index timestamp of last update of the index.intReturns index version.intwriteChunk(Iterator<Map<String, String>> iterator) Writes out the record iterator and returns the written record count.
-
Constructor Details
-
ChunkWriter
public ChunkWriter(String chunkName, OutputStream outputStream, int version, Date timestamp) throws IOException - Throws:
IOException
-
-
Method Details
-
getName
Returns the chunk name. -
getVersion
public int getVersion()Returns index version. All releases so far always returned1. -
getTimestamp
Returns the index timestamp of last update of the index. -
writeChunk
Writes out the record iterator and returns the written record count.- Throws:
IOException
-
close
Closes this reader and it's underlying input.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-