Class DirectoryStreamProvider

  • All Implemented Interfaces:
    StreamProvider, java.nio.file.FileVisitor<java.nio.file.Path>

    public class DirectoryStreamProvider
    extends java.nio.file.SimpleFileVisitor<java.nio.file.Path>
    implements StreamProvider
    The type Directory stream provider.
    • Constructor Summary

      Constructors 
      Constructor Description
      DirectoryStreamProvider​(java.io.File directory)
      Instantiates a new Directory stream provider.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes the stream provider.
      java.lang.String getCurrentDir()
      Gets current dir.
      Entry getCurrentEntry()
      Gets current entry.
      java.lang.String getCurrentEntryName()
      Gets current entry name.
      java.lang.String getCurrentFilename()
      Gets current filename.
      java.io.DataInputStream getNextClassEntryStream()
      Gets next class entry stream.
      java.io.DataInputStream getNextResourceEntryStream()
      Gets next resource entry stream.
      void reset()
      Resets the stream provider.
      java.nio.file.FileVisitResult visitFile​(java.nio.file.Path path, java.nio.file.attribute.BasicFileAttributes attrs)  
      • Methods inherited from class java.nio.file.SimpleFileVisitor

        postVisitDirectory, preVisitDirectory, visitFileFailed
      • Methods inherited from class java.lang.Object

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

      • DirectoryStreamProvider

        public DirectoryStreamProvider​(java.io.File directory)
                                throws java.io.IOException
        Instantiates a new Directory stream provider.
        Parameters:
        directory - the directory
        Throws:
        java.io.IOException - the io exception
    • Method Detail

      • visitFile

        public java.nio.file.FileVisitResult visitFile​(java.nio.file.Path path,
                                                       java.nio.file.attribute.BasicFileAttributes attrs)
                                                throws java.io.IOException
        Specified by:
        visitFile in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Overrides:
        visitFile in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException
      • getNextClassEntryStream

        public java.io.DataInputStream getNextClassEntryStream()
                                                        throws java.io.IOException
        Description copied from interface: StreamProvider
        Gets next class entry stream.
        Specified by:
        getNextClassEntryStream in interface StreamProvider
        Returns:
        the next class entry stream
        Throws:
        java.io.IOException - the io exception
      • getNextResourceEntryStream

        public java.io.DataInputStream getNextResourceEntryStream()
                                                           throws java.io.IOException
        Description copied from interface: StreamProvider
        Gets next resource entry stream.
        Specified by:
        getNextResourceEntryStream in interface StreamProvider
        Returns:
        the next resource entry stream
        Throws:
        java.io.IOException - the io exception
      • getCurrentEntryName

        public java.lang.String getCurrentEntryName()
        Description copied from interface: StreamProvider
        Gets current entry name.
        Specified by:
        getCurrentEntryName in interface StreamProvider
        Returns:
        the current entry name
      • getCurrentDir

        public java.lang.String getCurrentDir()
        Description copied from interface: StreamProvider
        Gets current dir.
        Specified by:
        getCurrentDir in interface StreamProvider
        Returns:
        the current dir
      • getCurrentFilename

        public java.lang.String getCurrentFilename()
        Description copied from interface: StreamProvider
        Gets current filename.
        Specified by:
        getCurrentFilename in interface StreamProvider
        Returns:
        the current filename
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: StreamProvider
        Closes the stream provider.
        Specified by:
        close in interface StreamProvider
        Throws:
        java.io.IOException