Class JsonArrayCveItemSource

  • All Implemented Interfaces:
    java.lang.AutoCloseable, CveItemSource<io.github.jeremylong.openvulnerability.client.nvd.DefCveItem>

    public class JsonArrayCveItemSource
    extends java.lang.Object
    implements CveItemSource<io.github.jeremylong.openvulnerability.client.nvd.DefCveItem>
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonArrayCveItemSource​(java.io.InputStream inputStream)
      Constructs a new Item Source.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean hasNext()
      Returns whether there is another item.
      io.github.jeremylong.openvulnerability.client.nvd.DefCveItem next()
      Returns the next item.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonArrayCveItemSource

        public JsonArrayCveItemSource​(java.io.InputStream inputStream)
                               throws java.io.IOException
        Constructs a new Item Source.
        Parameters:
        inputStream - the input stream to read from
        Throws:
        java.io.IOException - thrown if there is a problem reading from the input stream
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • hasNext

        public boolean hasNext()
        Description copied from interface: CveItemSource
        Returns whether there is another item.
        Specified by:
        hasNext in interface CveItemSource<io.github.jeremylong.openvulnerability.client.nvd.DefCveItem>
        Returns:
        truefalse.
      • next

        public io.github.jeremylong.openvulnerability.client.nvd.DefCveItem next()
                                                                          throws java.io.IOException
        Description copied from interface: CveItemSource
        Returns the next item.
        Specified by:
        next in interface CveItemSource<io.github.jeremylong.openvulnerability.client.nvd.DefCveItem>
        Returns:
        the next item
        Throws:
        java.io.IOException - thrown if there is an error reading from the source