what-the-bank/sources/com/bumptech/glide/load/data/ParcelFileDescriptorRewinde...

58 lines
1.7 KiB
Java

package com.bumptech.glide.load.data;
import android.os.ParcelFileDescriptor;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
import java.io.IOException;
import o.Box;
/* loaded from: classes.dex */
public final class ParcelFileDescriptorRewinder implements Box<ParcelFileDescriptor> {
public final InternalRewinder d;
@Override // o.Box
public final void b() {
}
@Override // o.Box
public final /* synthetic */ ParcelFileDescriptor a() throws IOException {
return this.d.rewind();
}
public ParcelFileDescriptorRewinder(ParcelFileDescriptor parcelFileDescriptor) {
this.d = new InternalRewinder(parcelFileDescriptor);
}
/* loaded from: classes.dex */
public static final class HBt implements Box.HBt<ParcelFileDescriptor> {
@Override // o.Box.HBt
public final /* synthetic */ Box<ParcelFileDescriptor> b(ParcelFileDescriptor parcelFileDescriptor) {
return new ParcelFileDescriptorRewinder(parcelFileDescriptor);
}
@Override // o.Box.HBt
public final Class<ParcelFileDescriptor> a() {
return ParcelFileDescriptor.class;
}
}
/* loaded from: classes.dex */
public static final class InternalRewinder {
private final ParcelFileDescriptor b;
InternalRewinder(ParcelFileDescriptor parcelFileDescriptor) {
this.b = parcelFileDescriptor;
}
public final ParcelFileDescriptor rewind() throws IOException {
try {
Os.lseek(this.b.getFileDescriptor(), 0L, OsConstants.SEEK_SET);
return this.b;
} catch (ErrnoException e) {
throw new IOException(e);
}
}
}
}