package com.google.crypto.tink.shaded.protobuf;

import java.io.IOException;

/* JADX INFO: renamed from: com.google.crypto.tink.shaded.protobuf.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC0735a implements P {
    protected int memoizedHashCode;

    public abstract int a(b0 b0Var);

    public final String b(String str) {
        return "Serializing " + getClass().getName() + " to a " + str + " threw an IOException (should never happen).";
    }

    public abstract AbstractC0753t d();

    public final byte[] e() {
        try {
            int iA = ((AbstractC0755v) this).a(null);
            byte[] bArr = new byte[iA];
            C0745k c0745k = new C0745k(iA, bArr);
            f(c0745k);
            if (iA - c0745k.f10518k == 0) {
                return bArr;
            }
            throw new IllegalStateException("Did not write as much data as expected.");
        } catch (IOException e8) {
            throw new RuntimeException(b("byte array"), e8);
        }
    }

    public abstract void f(C0745k c0745k);
}
