alexandroid/decompiled/jadx/sources/com/google/common/io/Closeables.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

55 lines
1.6 KiB
Java

package com.google.common.io;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.annotations.VisibleForTesting;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.util.logging.Level;
import java.util.logging.Logger;
import okio.Buffer$$ExternalSyntheticBUOutline0;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@J2ktIncompatible
@GwtIncompatible
/* loaded from: classes8.dex */
public final class Closeables {
@VisibleForTesting
static final Logger logger = Logger.getLogger(Closeables.class.getName());
private Closeables() {
}
public static void close(Closeable closeable, boolean z) throws IOException {
if (closeable == null) {
return;
}
try {
closeable.close();
} catch (IOException e) {
if (!z) {
throw e;
}
logger.log(Level.WARNING, "IOException thrown while closing Closeable.", (Throwable) e);
}
}
public static void closeQuietly(InputStream inputStream) {
try {
close(inputStream, true);
} catch (IOException e) {
Buffer$$ExternalSyntheticBUOutline0.m((Object) e);
}
}
public static void closeQuietly(Reader reader) {
try {
close(reader, true);
} catch (IOException e) {
Buffer$$ExternalSyntheticBUOutline0.m((Object) e);
}
}
}