}
static void printLedgerMetadata(ReadMetadataCallback cb) throws Exception {
LedgerMetadata md = cb.get();
System.out.println("ledgerID: " + cb.getLedgerId());
System.out.println(new String(md.serialize(), UTF_8));
}
static class ReadMetadataCallback extends AbstractFuture<LedgerMetadata>
implements GenericCallback<LedgerMetadata> {
final long ledgerId;