@Test public void mapImagePngToPng() { String extension = MimeTypeToExtensionsUtil.getExtension("image/png"); Assert.assertEquals("png", extension); }
public static String getExtension(final String mimeType) { if (MIME_TYPES_EXTENSIONS.containsKey(mimeType)) { return MIME_TYPES_EXTENSIONS.get(mimeType); } return mimeType.substring(mimeType.indexOf("/") + 1); }
MimeTypeToExtensionsUtil { public static String getExtension(final String mimeType) { if (MIME_TYPES_EXTENSIONS.containsKey(mimeType)) { return MIME_TYPES_EXTENSIONS.get(mimeType); } return mimeType.substring(mimeType.indexOf("/") + 1); } }
MimeTypeToExtensionsUtil { public static String getExtension(final String mimeType) { if (MIME_TYPES_EXTENSIONS.containsKey(mimeType)) { return MIME_TYPES_EXTENSIONS.get(mimeType); } return mimeType.substring(mimeType.indexOf("/") + 1); }  }
MimeTypeToExtensionsUtil { public static String getExtension(final String mimeType) { if (MIME_TYPES_EXTENSIONS.containsKey(mimeType)) { return MIME_TYPES_EXTENSIONS.get(mimeType); } return mimeType.substring(mimeType.indexOf("/") + 1); }  static String getExtension(final String mimeType); }
MimeTypeToExtensionsUtil { public static String getExtension(final String mimeType) { if (MIME_TYPES_EXTENSIONS.containsKey(mimeType)) { return MIME_TYPES_EXTENSIONS.get(mimeType); } return mimeType.substring(mimeType.indexOf("/") + 1); }  static String getExtension(final String mimeType);  }