Class DirectoryWrapper

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

    public class DirectoryWrapper
    extends java.nio.file.SimpleFileVisitor<java.nio.file.Path>
    implements Archive
    The type Directory wrapper.
    • Constructor Summary

      Constructors 
      Constructor Description
      DirectoryWrapper​(java.io.File directory)
      Instantiates a new Directory wrapper.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close.
      java.util.Enumeration<Entry> getEntries()
      Gets entries.
      java.io.InputStream getInputStream​(Entry entry)
      Gets input stream.
      java.util.jar.Manifest getManifest()
      Gets manifest.
      java.lang.String getName()
      Gets name.
      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

      • DirectoryWrapper

        public DirectoryWrapper​(java.io.File directory)
                         throws java.io.IOException
        Instantiates a new Directory wrapper.
        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
      • getName

        public java.lang.String getName()
        Description copied from interface: Archive
        Gets name.
        Specified by:
        getName in interface Archive
        Returns:
        the name
      • getEntries

        public java.util.Enumeration<Entry> getEntries()
        Description copied from interface: Archive
        Gets entries.
        Specified by:
        getEntries in interface Archive
        Returns:
        the entries
      • getManifest

        public java.util.jar.Manifest getManifest()
                                           throws java.io.IOException
        Description copied from interface: Archive
        Gets manifest.
        Specified by:
        getManifest in interface Archive
        Returns:
        the manifest
        Throws:
        java.io.IOException - the io exception
      • getInputStream

        public java.io.InputStream getInputStream​(Entry entry)
                                           throws java.io.IOException
        Description copied from interface: Archive
        Gets input stream.
        Specified by:
        getInputStream in interface Archive
        Parameters:
        entry - the entry
        Returns:
        the input stream
        Throws:
        java.io.IOException - the io exception
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: Archive
        Close.
        Specified by:
        close in interface Archive
        Throws:
        java.io.IOException - the io exception