Class ShrinkWrapDirectoryStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.nio.file.Path>, java.nio.file.DirectoryStream<java.nio.file.Path>

    class ShrinkWrapDirectoryStream
    extends java.lang.Object
    implements java.nio.file.DirectoryStream<java.nio.file.Path>
    ShrinkWrap implementation of a DirectoryStream
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.nio.file.DirectoryStream

        java.nio.file.DirectoryStream.Filter<T extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      ShrinkWrapDirectoryStream​(java.nio.file.Path startingPath, ShrinkWrapFileSystem fs, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
      Creates a new instance starting from startingPath with is required backing the specified ShrinkWrapFileSystem, which is required.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      java.util.Iterator<java.nio.file.Path> 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
    • Field Detail

      • filter

        private final java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter
      • startingPath

        private final java.nio.file.Path startingPath
      • closed

        private boolean closed
      • iteratorReturned

        private boolean iteratorReturned
    • Constructor Detail

      • ShrinkWrapDirectoryStream

        ShrinkWrapDirectoryStream​(java.nio.file.Path startingPath,
                                  ShrinkWrapFileSystem fs,
                                  java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
                           throws java.lang.IllegalArgumentException
        Creates a new instance starting from startingPath with is required backing the specified ShrinkWrapFileSystem, which is required. An optional DirectoryStream.Filter may be specified as well.
        Parameters:
        startingPath -
        fs -
        filter -
        Throws:
        java.lang.IllegalArgumentException - If the fs is not specified
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
        See Also:
        Closeable.close()
      • iterator

        public java.util.Iterator<java.nio.file.Path> iterator()
        Specified by:
        iterator in interface java.nio.file.DirectoryStream<java.nio.file.Path>
        Specified by:
        iterator in interface java.lang.Iterable<java.nio.file.Path>
        See Also:
        DirectoryStream.iterator()