Class Apk

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    @Immutable
    public class Apk
    extends DexAndroidArchive
    • Constructor Detail

      • Apk

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

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

      • getJavaResource

        @Nullable
        public java.nio.file.Path getJavaResource​(@NonNull
                                                  java.lang.String name)
                                           throws java.io.IOException
        Specified by:
        getJavaResource in class AndroidArchive
        Throws:
        java.io.IOException
      • getContentsSize

        public long getContentsSize()
                             throws java.io.IOException
        Returns the total size of all the contents in the APK. This is usually different from the size of the APK file itself (which also contains some meta-data). This method is useful for comparing APK files where the file sizes have changed (probably due to changes in meta-data) but the contents remain the same.
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Zip