package c.j.a.s;

import java.nio.ByteBuffer;

/* JADX INFO: compiled from: Table.java */
/* JADX INFO: loaded from: classes.dex */
public class c {
    public int a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public ByteBuffer f1571b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f1572c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f1573d;

    public c() {
        if (d.a == null) {
            d.a = new d();
        }
    }

    public int a(int i2) {
        if (i2 < this.f1573d) {
            return this.f1571b.getShort(this.f1572c + i2);
        }
        return 0;
    }

    public void b(int i2, ByteBuffer byteBuffer) {
        this.f1571b = byteBuffer;
        if (byteBuffer == null) {
            this.a = 0;
            this.f1572c = 0;
            this.f1573d = 0;
        } else {
            this.a = i2;
            int i3 = i2 - byteBuffer.getInt(i2);
            this.f1572c = i3;
            this.f1573d = this.f1571b.getShort(i3);
        }
    }
}
