@SuppressWarnings("UnusedException")
  private static JwtEcdsaPublicKey parsePublicKey(
      ProtoKeySerialization serialization, @Nullable SecretKeyAccess access)
      throws GeneralSecurityException {
    if (!serialization.getTypeUrl().equals(PUBLIC_TYPE_URL)) {
      throw new IllegalArgumentException(
          "Wrong type URL in call to EcdsaProtoSerialization.parsePublicKey: "
              + serialization.getTypeUrl());
    }
    try {
      com.google.crypto.tink.proto.JwtEcdsaPublicKey protoKey =
          com.google.crypto.tink.proto.JwtEcdsaPublicKey.parseFrom(
              serialization.getValue(), ExtensionRegistryLite.getEmptyRegistry());
      return parsePublicKeyFromProto(
          protoKey, serialization.getOutputPrefixType(), serialization.getIdRequirementOrNull());
    } catch (InvalidProtocolBufferException e) {
      throw new GeneralSecurityException("Parsing EcdsaPublicKey failed");
    }
  }
Methods to serialize and parse {@link JwtEcdsaPrivateKey}, {@link JwtEcdsaPublicKey}, and {@link
JwtEcdsaParameters} objects.
java_src/src/main/java/com/google/crypto/tink/jwt/JwtEcdsaProtoSerialization.java