The NumberDataFormat class has the following methods:
getFormat retrieves the format string. setFormat sets the format string.