SimpleObjectFilter f = new SimpleObjectFilter();
f.setClassName(className.getValues());
filter = f;
}
final HeapStatistics stats = VmUtils.getVm().getHeapManager().getHeapStatistics(filter);
if (argMinInstanceCount.isSet()) {
stats.setMinimumInstanceCount(argMinInstanceCount.getValue());
}
if (argMinTotalSize.isSet()) {
stats.setMinimumTotalSize(argMinTotalSize.getValue());
}
BufferedWriter writer = new BufferedWriter(getOutput().getWriter(), 2048);
try {
stats.writeTo(writer);
} finally {
writer.flush();
}
}