public static void serializeEncryptedKeyset(
      KeysetHandle keysetHandle, KeysetWriter writer, Aead aead, byte[] associatedData)
      throws GeneralSecurityException, IOException {
    keysetHandle.writeWithAssociatedData(writer, aead, associatedData);
  }
Serialize a keyset in an encrypted format to the writer.
java_src/src/main/java/com/google/crypto/tink/LegacyKeysetSerialization.java