Class FileIterator

  • All Implemented Interfaces:
    StreamIterator

    public class FileIterator
    extends java.lang.Object
    implements StreamIterator
    Version:
    $Revision: 1 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList files  
      private int index  
    • Constructor Summary

      Constructors 
      Constructor Description
      FileIterator​(java.io.File file, Filter filter)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Cleanup any open resources of the iterator
      protected static void create​(java.util.List list, java.io.File dir, Filter filter)  
      protected static void create​(java.util.List list, java.io.File dir, Filter filter, java.lang.String prefix)  
      java.io.InputStream next()
      User is resposible for closing the InputStream returned
      • Methods inherited from class java.lang.Object

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

      • files

        private java.util.ArrayList files
      • index

        private int index
    • Constructor Detail

      • FileIterator

        public FileIterator​(java.io.File file,
                            Filter filter)
    • Method Detail

      • create

        protected static void create​(java.util.List list,
                                     java.io.File dir,
                                     Filter filter)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • create

        protected static void create​(java.util.List list,
                                     java.io.File dir,
                                     Filter filter,
                                     java.lang.String prefix)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • next

        public java.io.InputStream next()
        Description copied from interface: StreamIterator
        User is resposible for closing the InputStream returned
        Specified by:
        next in interface StreamIterator
        Returns:
        null if no more streams left to iterate on
      • close

        public void close()
        Description copied from interface: StreamIterator
        Cleanup any open resources of the iterator
        Specified by:
        close in interface StreamIterator