List of usage examples for java.util UnknownFormatConversionException UnknownFormatConversionException
public UnknownFormatConversionException(String s)
From source file:org.silverpeas.core.contribution.converter.openoffice.OpenOfficeConverter.java
private org.jodconverter.document.DocumentFormat documentFormat(final DocumentFormat format) { String mimeType = format.getMimeType(); org.jodconverter.document.DocumentFormat docFormat = DefaultDocumentFormatRegistry .getFormatByMediaType(mimeType); if (docFormat == null) { if (RTF_MIME_TYPE.equals(mimeType)) { mimeType = mimeType.replaceFirst("application", "text"); }/* ww w.j av a 2s . c o m*/ docFormat = DefaultDocumentFormatRegistry.getFormatByMediaType(mimeType); } if (docFormat == null) { throw new UnknownFormatConversionException( "Unknown document format for MIME-TYPE: " + format.getMimeType()); } return docFormat; }