Class ResourceMetaDataIterator

  • All Implemented Interfaces:
    MetaDataIterator, Closeable

    public class ResourceMetaDataIterator
    extends java.lang.Object
    implements MetaDataIterator
    Iterator over a given metadata resource.
    Author:
    Abe White
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceMetaDataIterator​(java.lang.String rsrc)
      Constructor; supply the resource to parse.
      ResourceMetaDataIterator​(java.lang.String rsrc, java.lang.ClassLoader loader)
      Constructor; supply the resource to parse.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the resources used by this iterator.
      java.io.File getFile()
      Return the last-iterated metadata resource content as a file, or null if not an extant file.
      java.io.InputStream getInputStream()
      Return the last-iterated metadata resource content as a stream.
      boolean hasNext()
      Return whether there is another resource to iterate over.
      java.net.URL next()
      Return the next metadata resource.
      • Methods inherited from class java.lang.Object

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

      • ResourceMetaDataIterator

        public ResourceMetaDataIterator​(java.lang.String rsrc)
                                 throws java.io.IOException
        Constructor; supply the resource to parse.
        Throws:
        java.io.IOException
      • ResourceMetaDataIterator

        public ResourceMetaDataIterator​(java.lang.String rsrc,
                                        java.lang.ClassLoader loader)
                                 throws java.io.IOException
        Constructor; supply the resource to parse.
        Throws:
        java.io.IOException
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from interface: MetaDataIterator
        Return whether there is another resource to iterate over.
        Specified by:
        hasNext in interface MetaDataIterator
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Description copied from interface: MetaDataIterator
        Return the last-iterated metadata resource content as a stream.
        Specified by:
        getInputStream in interface MetaDataIterator
        Throws:
        java.io.IOException
      • getFile

        public java.io.File getFile()
                             throws java.io.IOException
        Description copied from interface: MetaDataIterator
        Return the last-iterated metadata resource content as a file, or null if not an extant file.
        Specified by:
        getFile in interface MetaDataIterator
        Throws:
        java.io.IOException