Class ChunkWriter

java.lang.Object
org.apache.maven.index.reader.ChunkWriter
All Implemented Interfaces:
Closeable, AutoCloseable

public class ChunkWriter extends Object implements Closeable
Maven 2 Index published binary chunk writer, it writes raw Maven Indexer records to the transport binary format.
Since:
5.1.2
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Returns the chunk name.
    • getVersion

      public int getVersion()
      Returns index version. All releases so far always returned 1.
    • getTimestamp

      public Date getTimestamp()
      Returns the index timestamp of last update of the index.
    • writeChunk

      public int writeChunk(Iterator<Map<String,String>> iterator) throws IOException
      Writes out the record iterator and returns the written record count.
      Throws:
      IOException
    • close

      public void close() throws IOException
      Closes this reader and it's underlying input.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException