Returns a format for a given ID, or throws an exception. This method is
used when reading an object from the byte array format.
throws: IllegalStateException - if the formatId does not correspond to apersistent class. This is an internal consistency error.
Returns a format for a given class, or throws an exception. This method
is used when writing an object that was passed in by the user.
throws: IllegalArgumentException - if the class is not persistent. Thisis a user error.