* Override Format.format().
* @see java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
*/
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
try {
CurrencyAmount currency = (CurrencyAmount) obj;
fmt.setCurrency(currency.getCurrency());
return fmt.format(currency.getNumber(), toAppendTo, pos);
} catch (ClassCastException e) {
throw new IllegalArgumentException("Invalid type: " + obj.getClass().getName());
}
}