* @throws org.pentaho.reporting.libraries.repository.ContentIOException
* if the name could not be generated for any reason.
*/
public String generateName(final String nameHint, final String mimeType) throws ContentIOException
{
final MimeRegistry mimeRegistry = fileContentLocation.getRepository().getMimeRegistry();
final File targetDirectory = fileContentLocation.getBackend();
final String suffix = mimeRegistry.getSuffix(mimeType);
try
{
final File tempFile = File.createTempFile(nameHint, "." + suffix, targetDirectory);
return tempFile.getName();
}