private static AesGcmHkdfStreamingParameters parseParameters(
      ProtoParametersSerialization serialization) throws GeneralSecurityException {
    if (!serialization.getKeyTemplate().getTypeUrl().equals(TYPE_URL)) {
      throw new IllegalArgumentException(
          "Wrong type URL in call to AesGcmHkdfStreamingParameters.parseParameters: "
              + serialization.getKeyTemplate().getTypeUrl());
    }
    com.google.crypto.tink.proto.AesGcmHkdfStreamingKeyFormat format;
    try {
      format =
          com.google.crypto.tink.proto.AesGcmHkdfStreamingKeyFormat.parseFrom(
              serialization.getKeyTemplate().getValue(), ExtensionRegistryLite.getEmptyRegistry());
    } catch (InvalidProtocolBufferException e) {
      throw new GeneralSecurityException("Parsing AesGcmHkdfStreamingParameters failed: ", e);
    }
    if (format.getVersion() != 0) {
      throw new GeneralSecurityException("Only version 0 parameters are accepted");
    }
    return toParametersObject(format.getParams(), format.getKeySize());
  }
Methods to serialize and parse {@link AesGcmHkdfStreamingKey} objects and {@link
AesGcmHkdfStreamingParameters} objects
java_src/src/main/java/com/google/crypto/tink/streamingaead/internal/AesGcmHkdfStreamingProtoSerialization.java