Class Zip

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Direct Known Subclasses:
    AndroidArchive

    @Immutable
    public class Zip
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      Zip​(java.io.File file)  
      Zip​(java.nio.file.Path file)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean exists()  
      java.util.List<java.nio.file.Path> getEntries()  
      java.util.List<java.nio.file.Path> getEntries​(java.util.regex.Pattern pattern)  
      java.nio.file.Path getEntry​(java.lang.String name)  
      java.nio.file.Path getEntryAsFile​(java.lang.String name)  
      Zip getEntryAsZip​(java.lang.String name)  
      java.nio.file.Path getFile()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Zip

        public Zip​(@NonNull
                   java.nio.file.Path file)
            throws java.io.IOException
        Throws:
        java.io.IOException
      • Zip

        public Zip​(@NonNull
                   java.io.File file)
            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getFile

        @NonNull
        public java.nio.file.Path getFile()
      • getEntry

        @Nullable
        public final java.nio.file.Path getEntry​(java.lang.String name)
      • getEntries

        @NonNull
        public final java.util.List<java.nio.file.Path> getEntries()
      • getEntries

        @NonNull
        public final java.util.List<java.nio.file.Path> getEntries​(@NonNull
                                                                   java.util.regex.Pattern pattern)
      • getEntryAsZip

        @NonNull
        public final Zip getEntryAsZip​(@NonNull
                                       java.lang.String name)
      • getEntryAsFile

        @NonNull
        public final java.nio.file.Path getEntryAsFile​(@NonNull
                                                       java.lang.String name)
      • exists

        public boolean exists()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception