printf utils

This commit is contained in:
Doug MacEachern 2004-11-20 02:50:38 +00:00
parent 02c7235d4d
commit fcc3854803
1 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,14 @@ public abstract class SigarCommandBase
return this.formatter; return this.formatter;
} }
public String sprintf(String format, Object[] items) {
return new PrintfFormat(format).sprintf(items);
}
public void printf(String format, Object[] items) {
println(sprintf(format, items));
}
public void printf(Object[] items) { public void printf(Object[] items) {
println(getFormatter().sprintf(items)); println(getFormatter().sprintf(items));
} }