static Encoding findByApiName(String apiName) throws CertificateEncodingException {
            for (Encoding element : values()) {
                if (element.apiName.equals(apiName)) {
                    return element;
                }
            }

            return null;
        }
Supported encoding types for CerthPath. Used by the various APIs that
encode this into bytes such as {@link #getEncoded()}.
common/src/main/java/org/conscrypt/OpenSSLX509CertPath.java