APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Class 9 Nepali Solutions
版本号:12.0
包名称:com.kakideveloper.class9nepalinote

MD5 校验值:abac416d58de62cbb13589224e25fe1c

反编译源代码说明

i.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package t1;

import android.util.Log;
import i1.f;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;

public final class i implements i1.f {

    static final byte[] f19058a = "Exif\u0000\u0000".getBytes(Charset.forName("UTF-8"));

    private static final int[] f19059b = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8};

    private static final class a implements c {

        private final ByteBuffer f19060a;

        a(ByteBuffer byteBuffer) {
            this.f19060a = byteBuffer;
            byteBuffer.order(ByteOrder.BIG_ENDIAN);
        }

        @Override
        public long a(long j6) {
            int min = (int) Math.min(this.f19060a.remaining(), j6);
            ByteBuffer byteBuffer = this.f19060a;
            byteBuffer.position(byteBuffer.position() + min);
            return min;
        }

        @Override
        public int b(byte[] bArr, int i6) {
            int min = Math.min(i6, this.f19060a.remaining());
            if (min == 0) {
                return -1;
            }
            this.f19060a.get(bArr, 0, min);
            return min;
        }

        @Override
        public short c() {
            return (short) (e() & 255);
        }

        @Override
        public int d() {
            return ((e() << 8) & 65280) | (e() & 255);
        }

        @Override
        public int e() {
            if (this.f19060a.remaining() < 1) {
                return -1;
            }
            return this.f19060a.get();
        }
    }

    public static final class b {

        private final ByteBuffer f19061a;

        b(byte[] bArr, int i6) {
            this.f19061a = (ByteBuffer) ByteBuffer.wrap(bArr).order(ByteOrder.BIG_ENDIAN).limit(i6);
        }

        private boolean c(int i6, int i7) {
            return this.f19061a.remaining() - i6 >= i7;
        }

        short a(int i6) {
            if (c(i6, 2)) {
                return this.f19061a.getShort(i6);
            }
            return (short) -1;
        }

        int b(int i6) {
            if (c(i6, 4)) {
                return this.f19061a.getInt(i6);
            }
            return -1;
        }

        int d() {
            return this.f19061a.remaining();
        }

        void e(ByteOrder byteOrder) {
            this.f19061a.order(byteOrder);
        }
    }

    public interface c {
        long a(long j6);

        int b(byte[] bArr, int i6);

        short c();

        int d();

        int e();
    }

    private static final class d implements c {

        private final InputStream f19062a;

        d(InputStream inputStream) {
            this.f19062a = inputStream;
        }

        @Override
        public long a(long j6) {
            if (j6 < 0) {
                return 0L;
            }
            long j7 = j6;
            while (j7 > 0) {
                long skip = this.f19062a.skip(j7);
                if (skip <= 0) {
                    if (this.f19062a.read() == -1) {
                        break;
                    }
                    skip = 1;
                }
                j7 -= skip;
            }
            return j6 - j7;
        }

        @Override
        public int b(byte[] bArr, int i6) {
            int i7 = i6;
            while (i7 > 0) {
                int read = this.f19062a.read(bArr, i6 - i7, i7);
                if (read == -1) {
                    break;
                }
                i7 -= read;
            }
            return i6 - i7;
        }

        @Override
        public short c() {
            return (short) (this.f19062a.read() & 255);
        }

        @Override
        public int d() {
            return ((this.f19062a.read() << 8) & 65280) | (this.f19062a.read() & 255);
        }

        @Override
        public int e() {
            return this.f19062a.read();
        }
    }

    private static int d(int i6, int i7) {
        return i6 + 2 + (i7 * 12);
    }

    private int e(c cVar, m1.b bVar) {
        int d6 = cVar.d();
        if (!g(d6)) {
            if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                Log.d("DfltImageHeaderParser", "Parser doesn't handle magic number: " + d6);
            }
            return -1;
        }
        int i6 = i(cVar);
        if (i6 == -1) {
            if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                Log.d("DfltImageHeaderParser", "Failed to parse exif segment length, or exif segment not found");
            }
            return -1;
        }
        byte[] bArr = (byte[]) bVar.e(i6, byte[].class);
        try {
            return k(cVar, bArr, i6);
        } finally {
            bVar.d(bArr);
        }
    }

    private f.a f(c cVar) {
        int d6 = cVar.d();
        if (d6 == 65496) {
            return f.a.JPEG;
        }
        int d7 = ((d6 << 16) & (-65536)) | (cVar.d() & 65535);
        if (d7 == -1991225785) {
            cVar.a(21L);
            return cVar.e() >= 3 ? f.a.PNG_A : f.a.PNG;
        }
        if ((d7 >> 8) == 4671814) {
            return f.a.GIF;
        }
        if (d7 != 1380533830) {
            return f.a.UNKNOWN;
        }
        cVar.a(4L);
        if ((((cVar.d() << 16) & (-65536)) | (cVar.d() & 65535)) != 1464156752) {
            return f.a.UNKNOWN;
        }
        int d8 = ((cVar.d() << 16) & (-65536)) | (cVar.d() & 65535);
        if ((d8 & (-256)) != 1448097792) {
            return f.a.UNKNOWN;
        }
        int i6 = d8 & 255;
        if (i6 == 88) {
            cVar.a(4L);
            return (cVar.e() & 16) != 0 ? f.a.WEBP_A : f.a.WEBP;
        }
        if (i6 != 76) {
            return f.a.WEBP;
        }
        cVar.a(4L);
        return (cVar.e() & 8) != 0 ? f.a.WEBP_A : f.a.WEBP;
    }

    private static boolean g(int i6) {
        return (i6 & 65496) == 65496 || i6 == 19789 || i6 == 18761;
    }

    private boolean h(byte[] bArr, int i6) {
        boolean z6 = bArr != null && i6 > f19058a.length;
        if (z6) {
            int i7 = 0;
            while (true) {
                byte[] bArr2 = f19058a;
                if (i7 >= bArr2.length) {
                    break;
                }
                if (bArr[i7] != bArr2[i7]) {
                    return false;
                }
                i7++;
            }
        }
        return z6;
    }

    private int i(c cVar) {
        short c6;
        int d6;
        long j6;
        long a7;
        do {
            short c7 = cVar.c();
            if (c7 != 255) {
                if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                    Log.d("DfltImageHeaderParser", "Unknown segmentId=" + ((int) c7));
                }
                return -1;
            }
            c6 = cVar.c();
            if (c6 == 218) {
                return -1;
            }
            if (c6 == 217) {
                if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                    Log.d("DfltImageHeaderParser", "Found MARKER_EOI in exif segment");
                }
                return -1;
            }
            d6 = cVar.d() - 2;
            if (c6 == 225) {
                return d6;
            }
            j6 = d6;
            a7 = cVar.a(j6);
        } while (a7 == j6);
        if (Log.isLoggable("DfltImageHeaderParser", 3)) {
            Log.d("DfltImageHeaderParser", "Unable to skip enough data, type: " + ((int) c6) + ", wanted to skip: " + d6 + ", but actually skipped: " + a7);
        }
        return -1;
    }

    private static int j(b bVar) {
        ByteOrder byteOrder;
        StringBuilder sb;
        String str;
        String sb2;
        short a7 = bVar.a(6);
        if (a7 != 18761) {
            if (a7 != 19789 && Log.isLoggable("DfltImageHeaderParser", 3)) {
                Log.d("DfltImageHeaderParser", "Unknown endianness = " + ((int) a7));
            }
            byteOrder = ByteOrder.BIG_ENDIAN;
        } else {
            byteOrder = ByteOrder.LITTLE_ENDIAN;
        }
        bVar.e(byteOrder);
        int b6 = bVar.b(10) + 6;
        short a8 = bVar.a(b6);
        for (int i6 = 0; i6 < a8; i6++) {
            int d6 = d(b6, i6);
            short a9 = bVar.a(d6);
            if (a9 == 274) {
                short a10 = bVar.a(d6 + 2);
                if (a10 >= 1 && a10 <= 12) {
                    int b7 = bVar.b(d6 + 4);
                    if (b7 >= 0) {
                        if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                            Log.d("DfltImageHeaderParser", "Got tagIndex=" + i6 + " tagType=" + ((int) a9) + " formatCode=" + ((int) a10) + " componentCount=" + b7);
                        }
                        int i7 = b7 + f19059b[a10];
                        if (i7 <= 4) {
                            int i8 = d6 + 8;
                            if (i8 >= 0 && i8 <= bVar.d()) {
                                if (i7 >= 0 && i7 + i8 <= bVar.d()) {
                                    return bVar.a(i8);
                                }
                                if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                                    sb = new StringBuilder();
                                    sb.append("Illegal number of bytes for TI tag data tagType=");
                                    sb.append((int) a9);
                                }
                            } else if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                                sb2 = "Illegal tagValueOffset=" + i8 + " tagType=" + ((int) a9);
                                Log.d("DfltImageHeaderParser", sb2);
                            }
                        } else if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                            sb = new StringBuilder();
                            str = "Got byte count > 4, not orientation, continuing, formatCode=";
                            sb.append(str);
                            sb.append((int) a10);
                        }
                    } else if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                        sb2 = "Negative tiff component count";
                        Log.d("DfltImageHeaderParser", sb2);
                    }
                } else if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                    sb = new StringBuilder();
                    str = "Got invalid format code = ";
                    sb.append(str);
                    sb.append((int) a10);
                }
                sb2 = sb.toString();
                Log.d("DfltImageHeaderParser", sb2);
            }
        }
        return -1;
    }

    private int k(c cVar, byte[] bArr, int i6) {
        int b6 = cVar.b(bArr, i6);
        if (b6 == i6) {
            if (h(bArr, i6)) {
                return j(new b(bArr, i6));
            }
            if (Log.isLoggable("DfltImageHeaderParser", 3)) {
                Log.d("DfltImageHeaderParser", "Missing jpeg exif preamble");
            }
            return -1;
        }
        if (Log.isLoggable("DfltImageHeaderParser", 3)) {
            Log.d("DfltImageHeaderParser", "Unable to read exif segment data, length: " + i6 + ", actually read: " + b6);
        }
        return -1;
    }

    @Override
    public f.a a(ByteBuffer byteBuffer) {
        return f(new a((ByteBuffer) g2.i.d(byteBuffer)));
    }

    @Override
    public int b(InputStream inputStream, m1.b bVar) {
        return e(new d((InputStream) g2.i.d(inputStream)), (m1.b) g2.i.d(bVar));
    }

    @Override
    public f.a c(InputStream inputStream) {
        return f(new d((InputStream) g2.i.d(inputStream)));
    }
}