51 lines
1.6 KiB
Java
51 lines
1.6 KiB
Java
|
package o;
|
||
|
|
||
|
import android.os.ParcelFileDescriptor;
|
||
|
import java.io.IOException;
|
||
|
import java.io.InputStream;
|
||
|
import java.io.OutputStream;
|
||
|
|
||
|
/* renamed from: o.fQR, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class C13085fQR {
|
||
|
public static void b(InputStream inputStream, OutputStream outputStream) {
|
||
|
byte[] bArr = new byte[4096];
|
||
|
while (true) {
|
||
|
try {
|
||
|
int read = inputStream.read(bArr);
|
||
|
if (read > 0) {
|
||
|
outputStream.write(bArr, 0, read);
|
||
|
}
|
||
|
} catch (IOException unused) {
|
||
|
} catch (Throwable th) {
|
||
|
try {
|
||
|
inputStream.close();
|
||
|
} catch (IOException unused2) {
|
||
|
}
|
||
|
try {
|
||
|
outputStream.close();
|
||
|
throw th;
|
||
|
} catch (IOException unused3) {
|
||
|
throw th;
|
||
|
}
|
||
|
}
|
||
|
try {
|
||
|
break;
|
||
|
} catch (IOException unused4) {
|
||
|
}
|
||
|
}
|
||
|
inputStream.close();
|
||
|
try {
|
||
|
outputStream.close();
|
||
|
} catch (IOException unused5) {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static ParcelFileDescriptor aCk_(InputStream inputStream) throws IOException {
|
||
|
ParcelFileDescriptor[] createPipe = ParcelFileDescriptor.createPipe();
|
||
|
ParcelFileDescriptor parcelFileDescriptor = createPipe[0];
|
||
|
b(inputStream, new ParcelFileDescriptor.AutoCloseOutputStream(createPipe[1]));
|
||
|
return parcelFileDescriptor;
|
||
|
}
|
||
|
}
|