public void retrieveAndPrintBucketStats(ClientParameters.SelectionType type, String id, boolean dumpData, String bucketSpace) throws BucketStatsException {
        BucketId bucketId = retriever.getBucketIdForType(type, id);
        if (type == ClientParameters.SelectionType.GROUP || type == ClientParameters.SelectionType.USER) {
            out.printf("Generated 32-bit bucket id: %s\n", bucketId);
        }

        List<GetBucketListReply.BucketInfo> bucketList = retriever.retrieveBucketList(bucketId, bucketSpace);
        printBucketList(bucketList);

        if (dumpData) {
            for (GetBucketListReply.BucketInfo bucketInfo : bucketList) {
                BucketId bucket = bucketInfo.getBucketId();
                String bucketStats = retriever.retrieveBucketStats(type, id, bucket, bucketSpace);
                printBucketStats(bucket, bucketStats);
            }
        }
    }
The class is responsible for printing bucket information to a printstream.

@author bjorncs
vespaclient-java/src/main/java/com/yahoo/vespastat/BucketStatsPrinter.java