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 { 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 { @Override // o.Box.HBt public final /* synthetic */ Box b(ParcelFileDescriptor parcelFileDescriptor) { return new ParcelFileDescriptorRewinder(parcelFileDescriptor); } @Override // o.Box.HBt public final Class 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); } } } }