Class ChunkReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.util.Map<java.lang.String,​java.lang.String>>

    public class ChunkReader
    extends java.lang.Object
    implements java.io.Closeable, java.lang.Iterable<java.util.Map<java.lang.String,​java.lang.String>>
    Maven 2 Index published binary chunk reader, it reads raw Maven Indexer records from the transport binary format.
    Since:
    5.1.2
    • Constructor Summary

      Constructors 
      Constructor Description
      ChunkReader​(java.lang.String chunkName, java.io.InputStream inputStream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes this reader and it's underlying input.
      java.lang.String getName()
      Returns the chunk name.
      java.util.Date getTimestamp()
      Returns the index timestamp of last update of the index.
      int getVersion()
      Returns index version.
      java.util.Iterator<java.util.Map<java.lang.String,​java.lang.String>> iterator()
      Returns the Record iterator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • ChunkReader

        public ChunkReader​(java.lang.String chunkName,
                           java.io.InputStream inputStream)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getName

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

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

        public java.util.Date getTimestamp()
        Returns the index timestamp of last update of the index.
      • iterator

        public java.util.Iterator<java.util.Map<java.lang.String,​java.lang.String>> iterator()
        Returns the Record iterator.
        Specified by:
        iterator in interface java.lang.Iterable<java.util.Map<java.lang.String,​java.lang.String>>
      • close

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