Files
rr3-apk/smali_classes2/com/google/android/gms/common/util/IOUtils.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

358 lines
8.2 KiB
Smali

.class public final Lcom/google/android/gms/common/util/IOUtils;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static closeQuietly(Landroid/os/ParcelFileDescriptor;)V
.locals 0
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
if-eqz p0, :cond_0
.line 1
:try_start_0
invoke-virtual {p0}, Landroid/os/ParcelFileDescriptor;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:cond_0
return-void
.end method
.method public static closeQuietly(Ljava/io/Closeable;)V
.locals 0
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
if-eqz p0, :cond_0
.line 2
:try_start_0
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:cond_0
return-void
.end method
.method public static copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;)J
.locals 2
.param p0 # Ljava/io/InputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Ljava/io/OutputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Lcom/google/errorprone/annotations/ResultIgnorabilityUnspecified;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
const/16 v1, 0x400
.line 1
invoke-static {p0, p1, v0, v1}, Lcom/google/android/gms/common/util/IOUtils;->copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;ZI)J
move-result-wide p0
return-wide p0
.end method
.method public static copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;ZI)J
.locals 7
.param p0 # Ljava/io/InputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Ljava/io/OutputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation runtime Lcom/google/errorprone/annotations/ResultIgnorabilityUnspecified;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 2
new-array v0, p3, [B
const-wide/16 v1, 0x0
:goto_0
const/4 v3, 0x0
.line 3
:try_start_0
invoke-virtual {p0, v0, v3, p3}, Ljava/io/InputStream;->read([BII)I
move-result v4
const/4 v5, -0x1
if-eq v4, v5, :cond_0
int-to-long v5, v4
add-long/2addr v1, v5
.line 4
invoke-virtual {p1, v0, v3, v4}, Ljava/io/OutputStream;->write([BII)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception p3
goto :goto_1
:cond_0
if-eqz p2, :cond_1
.line 5
invoke-static {p0}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
.line 6
invoke-static {p1}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
:cond_1
return-wide v1
:goto_1
if-nez p2, :cond_2
goto :goto_2
.line 5
:cond_2
invoke-static {p0}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
.line 6
invoke-static {p1}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
.line 7
:goto_2
throw p3
.end method
.method public static isGzipByteBuffer([B)Z
.locals 3
.param p0 # [B
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 1
array-length v0, p0
const/4 v1, 0x0
const/4 v2, 0x1
if-le v0, v2, :cond_0
aget-byte v0, p0, v1
and-int/lit16 v0, v0, 0xff
aget-byte p0, p0, v2
and-int/lit16 p0, p0, 0xff
shl-int/lit8 p0, p0, 0x8
or-int/2addr p0, v0
const v0, 0x8b1f
if-ne p0, v0, :cond_0
return v2
:cond_0
return v1
.end method
.method public static readInputStreamFully(Ljava/io/InputStream;)[B
.locals 1
.param p0 # Ljava/io/InputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x1
.line 1
invoke-static {p0, v0}, Lcom/google/android/gms/common/util/IOUtils;->readInputStreamFully(Ljava/io/InputStream;Z)[B
move-result-object p0
return-object p0
.end method
.method public static readInputStreamFully(Ljava/io/InputStream;Z)[B
.locals 2
.param p0 # Ljava/io/InputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 2
new-instance v0, Ljava/io/ByteArrayOutputStream;
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
const/16 v1, 0x400
.line 3
invoke-static {p0, v0, p1, v1}, Lcom/google/android/gms/common/util/IOUtils;->copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;ZI)J
.line 4
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object p0
return-object p0
.end method
.method public static toByteArray(Ljava/io/InputStream;)[B
.locals 4
.param p0 # Ljava/io/InputStream;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 1
new-instance v0, Ljava/io/ByteArrayOutputStream;
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
.line 2
invoke-static {p0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 3
invoke-static {v0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
const/16 v1, 0x1000
new-array v1, v1, [B
.line 4
:goto_0
invoke-virtual {p0, v1}, Ljava/io/InputStream;->read([B)I
move-result v2
const/4 v3, -0x1
if-ne v2, v3, :cond_0
.line 6
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object p0
return-object p0
:cond_0
const/4 v3, 0x0
.line 5
invoke-virtual {v0, v1, v3, v2}, Ljava/io/OutputStream;->write([BII)V
goto :goto_0
.end method