导航菜单

页面标题

页面副标题

Meine NEW v2.0.3616 - y1.java 源代码

正在查看: Meine NEW v2.0.3616 应用的 y1.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package c4;

import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public final class y1 {

    public static final b4.j f2565h = new b4.j("SliceMetadataManager");

    public final w f2567b;
    public final String c;

    public final int f2568d;

    public final long f2569e;

    public final String f2570f;

    public final byte[] f2566a = new byte[UserMetadata.MAX_INTERNAL_KEY_SIZE];

    public int f2571g = -1;

    public y1(w wVar, String str, int i5, long j5, String str2) {
        this.f2567b = wVar;
        this.c = str;
        this.f2568d = i5;
        this.f2569e = j5;
        this.f2570f = str2;
    }

    public final int a() {
        w wVar = this.f2567b;
        wVar.getClass();
        File file = new File(new File(new File(new File(wVar.c(this.c, this.f2568d, this.f2569e), "_slices"), "_metadata"), this.f2570f), "checkpoint.dat");
        if (!file.exists()) {
            return 0;
        }
        FileInputStream fileInputStream = new FileInputStream(file);
        try {
            Properties properties = new Properties();
            properties.load(fileInputStream);
            fileInputStream.close();
            if (Integer.parseInt(properties.getProperty("fileStatus", "-1")) == 4) {
                return -1;
            }
            if (properties.getProperty("previousChunk") != null) {
                return Integer.parseInt(properties.getProperty("previousChunk")) + 1;
            }
            throw new o0("Slice checkpoint file corrupt.");
        } catch (Throwable th) {
            try {
                fileInputStream.close();
            } catch (Throwable unused) {
            }
            throw th;
        }
    }

    public final c0 b() {
        w wVar = this.f2567b;
        wVar.getClass();
        File file = new File(new File(new File(new File(wVar.c(this.c, this.f2568d, this.f2569e), "_slices"), "_metadata"), this.f2570f), "checkpoint.dat");
        if (!file.exists()) {
            throw new o0("Slice checkpoint file does not exist.");
        }
        Properties properties = new Properties();
        FileInputStream fileInputStream = new FileInputStream(file);
        try {
            properties.load(fileInputStream);
            fileInputStream.close();
            if (properties.getProperty("fileStatus") == null || properties.getProperty("previousChunk") == null) {
                throw new o0("Slice checkpoint file corrupt.");
            }
            try {
                int parseInt = Integer.parseInt(properties.getProperty("fileStatus"));
                String property = properties.getProperty("fileName");
                long parseLong = Long.parseLong(properties.getProperty("fileOffset", "-1"));
                long parseLong2 = Long.parseLong(properties.getProperty("remainingBytes", "-1"));
                int parseInt2 = Integer.parseInt(properties.getProperty("previousChunk"));
                this.f2571g = Integer.parseInt(properties.getProperty("metadataFileCounter", "0"));
                return new c0(parseInt, parseInt2, parseLong, parseLong2, property);
            } catch (NumberFormatException e6) {
                throw new o0("Slice checkpoint file corrupt.", e6);
            }
        } catch (Throwable th) {
            try {
                fileInputStream.close();
            } catch (Throwable unused) {
            }
            throw th;
        }
    }

    public final File c() {
        w wVar = this.f2567b;
        wVar.getClass();
        File file = new File(new File(new File(wVar.c(this.c, this.f2568d, this.f2569e), "_slices"), "_metadata"), this.f2570f);
        if (!file.exists()) {
            file.mkdirs();
        }
        return new File(file, String.format("%s-NAM.dat", Integer.valueOf(this.f2571g)));
    }

    public final void d(int i5) {
        Properties properties = new Properties();
        properties.put("fileStatus", "3");
        properties.put("fileOffset", String.valueOf(c().length()));
        properties.put("previousChunk", String.valueOf(i5));
        properties.put("metadataFileCounter", String.valueOf(this.f2571g));
        FileOutputStream fileOutputStream = new FileOutputStream(j());
        try {
            properties.store(fileOutputStream, (String) null);
            fileOutputStream.close();
        } catch (Throwable th) {
            try {
                fileOutputStream.close();
            } catch (Throwable unused) {
            }
            throw th;
        }
    }

    public final void e(String str, long j5, long j6, int i5) {
        Properties properties = new Properties();
        properties.put("fileStatus", "1");
        properties.put("fileName", str);
        properties.put("fileOffset", String.valueOf(j5));
        properties.put("remainingBytes", String.valueOf(j6));
        properties.put("previousChunk", String.valueOf(i5));
        properties.put("metadataFileCounter", String.valueOf(this.f2571g));
        FileOutputStream fileOutputStream = new FileOutputStream(j());
        try {
            properties.store(fileOutputStream, (String) null);
            fileOutputStream.close();
        } catch (Throwable th) {
            try {
                fileOutputStream.close();
            } catch (Throwable unused) {
            }
            throw th;
        }
    }

    public final void f(byte[] bArr, int i5) {
        Properties properties = new Properties();
        properties.put("fileStatus", "2");
        properties.put("previousChunk", String.valueOf(i5));
        properties.put("metadataFileCounter", String.valueOf(this.f2571g));
        FileOutputStream fileOutputStream = new FileOutputStream(j());
        try {
            properties.store(fileOutputStream, (String) null);
            fileOutputStream.close();
            w wVar = this.f2567b;
            wVar.getClass();
            File file = new File(new File(new File(new File(wVar.c(this.c, this.f2568d, this.f2569e), "_slices"), "_metadata"), this.f2570f), "checkpoint_ext.dat");
            if (file.exists()) {
                file.delete();
            }
            fileOutputStream = new FileOutputStream(file);
            try {
                fileOutputStream.write(bArr);
            } finally {
                try {
                    fileOutputStream.close();
                } catch (Throwable unused) {
                }
            }
        } finally {
        }
    }

    public final void g(int i5) {
        Properties properties = new Properties();
        properties.put("fileStatus", "4");
        properties.put("previousChunk", String.valueOf(i5));
        properties.put("metadataFileCounter", String.valueOf(this.f2571g));
        FileOutputStream fileOutputStream = new FileOutputStream(j());
        try {
            properties.store(fileOutputStream, (String) null);
            fileOutputStream.close();
        } catch (Throwable th) {
            try {
                fileOutputStream.close();
            } catch (Throwable unused) {
            }
            throw th;
        }
    }

    public final void h(byte[] bArr) {
        this.f2571g++;
        w wVar = this.f2567b;
        wVar.getClass();
        File file = new File(new File(new File(wVar.c(this.c, this.f2568d, this.f2569e), "_slices"), "_metadata"), this.f2570f);
        if (!file.exists()) {
            file.mkdirs();
        }
        try {
            FileOutputStream fileOutputStream = new FileOutputStream(new File(file, String.format("%s-LFH.dat", Integer.valueOf(this.f2571g))));
            try {
                fileOutputStream.write(bArr);
                fileOutputStream.close();
            } catch (Throwable th) {
                try {
                    fileOutputStream.close();
                } catch (Throwable unused) {
                }
                throw th;
            }
        } catch (IOException e6) {
            throw new o0("Could not write metadata file.", e6);
        }
    }

    public final void i(byte[] bArr, InputStream inputStream) {
        byte[] bArr2 = this.f2566a;
        this.f2571g++;
        FileOutputStream fileOutputStream = new FileOutputStream(c());
        try {
            fileOutputStream.write(bArr);
            int read = inputStream.read(bArr2);
            while (read > 0) {
                fileOutputStream.write(bArr2, 0, read);
                read = inputStream.read(bArr2);
            }
            fileOutputStream.close();
        } catch (Throwable th) {
            try {
                fileOutputStream.close();
            } catch (Throwable unused) {
            }
            throw th;
        }
    }

    public final File j() {
        w wVar = this.f2567b;
        wVar.getClass();
        File file = new File(new File(new File(new File(wVar.c(this.c, this.f2568d, this.f2569e), "_slices"), "_metadata"), this.f2570f), "checkpoint.dat");
        file.getParentFile().mkdirs();
        file.createNewFile();
        return file;
    }
}