Sets the data format.
The method returns null if the format is not supported.
Otherwise, it returns the format that's actually set.
However in some situations, returning a non-null
format does not necessarily mean that the format is supported
since determining the supported formats may be state dependent
or simply too costly. In such cases, the setFormat call will
succeed but the object may fail in another state-transition
operation such as when the object is being initialized.
Alternatively, the getSupportedFormats method can be used to
query for the list of supported formats. The resulting list
can be used to screen for the valid formats before setting
that on the object.