granularity level: instruction

		.class public final Lcom/google/android/gms/common/util/IOUtils;
.super Ljava/lang/Object;
.source "com.google.android.gms:play-services-basement@@18.1.0"

.annotation runtime Ljava/lang/Deprecated;
.end annotation



.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
	.param p0    # Landroid/os/ParcelFileDescriptor;
	.annotation runtime Ljavax/annotation/Nullable;
	.end annotation
	.end param

	if-eqz p0, :cond_0
	: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
	:cond_0
	:catch_0
	return-void
.end method

.method public static closeQuietly(Ljava/io/Closeable;)V
	.locals 0
	.param p0    # Ljava/io/Closeable;
	.annotation runtime Ljavax/annotation/Nullable;
	.end annotation
	.end param

	if-eqz p0, :cond_0
	: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
	:cond_0
	:catch_0
	return-void
.end method

.method public static copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;)J
	.locals 2
	.annotation runtime Ljava/lang/Deprecated;
	.end annotation
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/io/IOException;
	}
	.end annotation

	const/4 v0, 0x0
	const/16 v1, 0x400
	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
	.annotation runtime Ljava/lang/Deprecated;
	.end annotation
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/io/IOException;
	}
	.end annotation

	new-array v0, p3, [B
	const-wide/16 v1, 0x0
	:goto_0
	const/4 v3, 0x0
	: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
	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
	:cond_0
	if-eqz p2, :cond_1
	invoke-static {p0}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
	invoke-static {p1}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
	:cond_1
	return-wide v1
	:catchall_0
	move-exception p3
	if-nez p2, :cond_2
	goto :goto_1
	:cond_2
	invoke-static {p0}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
	invoke-static {p1}, Lcom/google/android/gms/common/util/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
	:goto_1
	throw p3
.end method

.method public static isGzipByteBuffer([B)Z
	.locals 3

	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
	.annotation runtime Ljava/lang/Deprecated;
	.end annotation
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/io/IOException;
	}
	.end annotation

	const/4 v0, 0x1
	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
	.annotation runtime Ljava/lang/Deprecated;
	.end annotation
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/io/IOException;
	}
	.end annotation

	new-instance v0, Ljava/io/ByteArrayOutputStream;
	invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
	const/16 v1, 0x400
	invoke-static {p0, v0, p1, v1}, Lcom/google/android/gms/common/util/IOUtils;->copyStream(Ljava/io/InputStream;Ljava/io/OutputStream;ZI)J
	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
	.annotation runtime Ljava/lang/Deprecated;
	.end annotation
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/io/IOException;
	}
	.end annotation

	new-instance v0, Ljava/io/ByteArrayOutputStream;
	invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
	invoke-static {p0}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
	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
	: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
	invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
	move-result-object p0
	return-object p0
	:cond_0
	const/4 v3, 0x0
	invoke-virtual {v0, v1, v3, v2}, Ljava/io/OutputStream;->write([BII)V
	goto :goto_0
.end method