Files
rr3-apk/decompiled-community/sources/com/google/firebase/crashlytics/internal/common/BytesBackedNativeSessionFile.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

73 lines
2.5 KiB
Java

package com.google.firebase.crashlytics.internal.common;
import com.google.firebase.crashlytics.internal.model.CrashlyticsReport;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPOutputStream;
/* loaded from: classes3.dex */
public class BytesBackedNativeSessionFile implements NativeSessionFile {
public final byte[] bytes;
public final String dataTransportFilename;
public final String reportsEndpointFilename;
@Override // com.google.firebase.crashlytics.internal.common.NativeSessionFile
public String getReportsEndpointFilename() {
return this.reportsEndpointFilename;
}
public BytesBackedNativeSessionFile(String str, String str2, byte[] bArr) {
this.dataTransportFilename = str;
this.reportsEndpointFilename = str2;
this.bytes = bArr;
}
@Override // com.google.firebase.crashlytics.internal.common.NativeSessionFile
public InputStream getStream() {
if (isEmpty()) {
return null;
}
return new ByteArrayInputStream(this.bytes);
}
@Override // com.google.firebase.crashlytics.internal.common.NativeSessionFile
public CrashlyticsReport.FilesPayload.File asFilePayload() {
byte[] asGzippedBytes = asGzippedBytes();
if (asGzippedBytes == null) {
return null;
}
return CrashlyticsReport.FilesPayload.File.builder().setContents(asGzippedBytes).setFilename(this.dataTransportFilename).build();
}
public final boolean isEmpty() {
byte[] bArr = this.bytes;
return bArr == null || bArr.length == 0;
}
public final byte[] asGzippedBytes() {
if (isEmpty()) {
return null;
}
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
try {
GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);
try {
gZIPOutputStream.write(this.bytes);
gZIPOutputStream.finish();
byte[] byteArray = byteArrayOutputStream.toByteArray();
gZIPOutputStream.close();
byteArrayOutputStream.close();
return byteArray;
} finally {
}
} finally {
}
} catch (IOException unused) {
return null;
}
}
}