package d3;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class k {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f24964a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f24965b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final long f24966c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final long f24967d;

    public k(int i10, int i11, long j10, long j11) {
        this.f24964a = i10;
        this.f24965b = i11;
        this.f24966c = j10;
        this.f24967d = j11;
    }

    public static k a(File file) throws IOException {
        DataInputStream dataInputStream = new DataInputStream(new FileInputStream(file));
        try {
            k kVar = new k(dataInputStream.readInt(), dataInputStream.readInt(), dataInputStream.readLong(), dataInputStream.readLong());
            dataInputStream.close();
            return kVar;
        } catch (Throwable th) {
            try {
                dataInputStream.close();
            } catch (Throwable th2) {
                th.addSuppressed(th2);
            }
            throw th;
        }
    }

    public final void b(File file) throws IOException {
        file.delete();
        DataOutputStream dataOutputStream = new DataOutputStream(new FileOutputStream(file));
        try {
            dataOutputStream.writeInt(this.f24964a);
            dataOutputStream.writeInt(this.f24965b);
            dataOutputStream.writeLong(this.f24966c);
            dataOutputStream.writeLong(this.f24967d);
            dataOutputStream.close();
        } catch (Throwable th) {
            try {
                dataOutputStream.close();
            } catch (Throwable th2) {
                th.addSuppressed(th2);
            }
            throw th;
        }
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || !(obj instanceof k)) {
            return false;
        }
        k kVar = (k) obj;
        return this.f24965b == kVar.f24965b && this.f24966c == kVar.f24966c && this.f24964a == kVar.f24964a && this.f24967d == kVar.f24967d;
    }

    public final int hashCode() {
        return Objects.hash(Integer.valueOf(this.f24965b), Long.valueOf(this.f24966c), Integer.valueOf(this.f24964a), Long.valueOf(this.f24967d));
    }
}
