@SuppressWarnings("UnusedException")
  public static KeysetHandle parseKeyset(byte[] serializedKeyset, SecretKeyAccess access)
      throws GeneralSecurityException {
    if (access == null) {
      throw new NullPointerException("SecretKeyAccess cannot be null");
    }
    try {
      return CleartextKeysetHandle.read(BinaryKeysetReader.withBytes(serializedKeyset));
    } catch (IOException e) {
      throw new GeneralSecurityException("Parse keyset failed");
    }
  }
Functions to parse and serialize Keyset in Tink's binary format based on Protobufs.
java_src/src/main/java/com/google/crypto/tink/TinkProtoKeysetFormat.java