@Test public void testGetConverterName() { assertEquals("toText2", mimeTypeTranslationHelper.getConverterName("application/pdf", "text/plain")); assertEquals("wildcard", mimeTypeTranslationHelper.getConverterName("foo", "text/plain")); assertEquals("wildcard-subtype", mimeTypeTranslationHelper.getConverterName("image/bmp", "image/jpg")); assertEquals("toJpg1", mimeTypeTranslationHelper.getConverterName("image/png", "image/jpg")); String mimeType = "text/html; charset=ISO-8859-15;\n" + " name=\"Nuxeo: open source ECM - Enterprise Content Management.html\""; assertEquals("html2text", mimeTypeTranslationHelper.getConverterName(mimeType, "text/plain")); }
public String getConverterName(String sourceMimeType, String destinationMimeType) { return getConverterName(sourceMimeType, destinationMimeType, true); }
MimeTypeTranslationHelper { public String getConverterName(String sourceMimeType, String destinationMimeType) { return getConverterName(sourceMimeType, destinationMimeType, true); } }
MimeTypeTranslationHelper { public String getConverterName(String sourceMimeType, String destinationMimeType) { return getConverterName(sourceMimeType, destinationMimeType, true); }  }
MimeTypeTranslationHelper { public String getConverterName(String sourceMimeType, String destinationMimeType) { return getConverterName(sourceMimeType, destinationMimeType, true); }  void addConverter(ConverterDescriptor desc); String getConverterName(String sourceMimeType, String destinationMimeType); String getConverterName(String sourceMimeType, String destinationMimeType, boolean allowWildcard); boolean hasCompatibleMimeType(List<String> mimeTypes, String mimeType); List<String> getConverterNames(String sourceMimeType, String destinationMimeType); List<String> getConverterNames(String sourceMimeType, String destinationMimeType, boolean allowWildcard); @Deprecated List<String> getDestinationMimeTypes(String sourceMimeType); @Deprecated List<String> getSourceMimeTypes(String destinationMimeType); void clear(); }
MimeTypeTranslationHelper { public String getConverterName(String sourceMimeType, String destinationMimeType) { return getConverterName(sourceMimeType, destinationMimeType, true); }  void addConverter(ConverterDescriptor desc); String getConverterName(String sourceMimeType, String destinationMimeType); String getConverterName(String sourceMimeType, String destinationMimeType, boolean allowWildcard); boolean hasCompatibleMimeType(List<String> mimeTypes, String mimeType); List<String> getConverterNames(String sourceMimeType, String destinationMimeType); List<String> getConverterNames(String sourceMimeType, String destinationMimeType, boolean allowWildcard); @Deprecated List<String> getDestinationMimeTypes(String sourceMimeType); @Deprecated List<String> getSourceMimeTypes(String destinationMimeType); void clear(); static final String ANY_MIME_TYPE; static final Pattern MIME_TYPE_PATTERN; }