StringBuffer sbuf = new StringBuffer();
Statistic[] stats = getStatistics();
int sz = stats.length;
for (int i=0; i<sz; i++) {
if (stats[i] instanceof CountStatistic) {
CountStatistic stat = (CountStatistic) stats[i];
sbuf.append(stat.getName()).append("=")
.append(stat.getCount()).append("; ");
} else if (stats[i] instanceof BoundedRangeStatistic) {
BoundedRangeStatistic stat = (BoundedRangeStatistic) stats[i];
sbuf.append(stat.getName()).append("=")
.append(stat.getCurrent()).append("; ");
} else {
sbuf.append(stats[i].getName()).append("=?");
}
}