public static void list(InputStream inputStream,
      String inFormat, String masterKeyUri, String credentialPath) throws Exception {
    KeysetHandle handle = TinkeyUtil.getKeysetHandle(inputStream, inFormat, masterKeyUri,
        credentialPath);
    KeysetInfo keysetInfo = handle.getKeysetInfo();
    System.out.println(keysetInfo);
  }
Lists all keys in the keyset in {@code inputStream} (using {@code credentialPath} to
decrypt if it is encrypted). This command doesn't output actual key material.
tools/tinkey/src/main/java/com/google/crypto/tink/tinkey/ListKeysetCommand.java