// 
// Decompiled by Procyon v0.6.0
// 

package org.bouncycastle.jcajce.provider.asymmetric.x509;

import org.bouncycastle.asn1.x509.BasicConstraints;
import org.bouncycastle.asn1.x509.Certificate;
import org.bouncycastle.jcajce.util.JcaJceHelper;
import java.security.cert.CertificateEncodingException;

class X509CertificateInternal extends X509CertificateImpl
{
    private final byte[] encoding;
    private final CertificateEncodingException exception;
    
    X509CertificateInternal(final JcaJceHelper jcaJceHelper, final org.bouncycastle.asn1.x509.Certificate certificate, final BasicConstraints basicConstraints, final boolean[] array, final String s, final byte[] array2, final byte[] encoding, final CertificateEncodingException exception) {
        super(jcaJceHelper, certificate, basicConstraints, array, s, array2);
        this.encoding = encoding;
        this.exception = exception;
    }
    
    @Override
    public byte[] getEncoded() throws CertificateEncodingException {
        if (null != this.exception) {
            throw this.exception;
        }
        if (null == this.encoding) {
            throw new CertificateEncodingException();
        }
        return this.encoding;
    }
}
