1 22 23 package de.laures.cewolf.taglib.util; 24 25 import de.laures.cewolf.WebConstants; 26 27 30 public class MIMEExtensionHelper { 31 32 public static String getExtensionForMimeType(String mimeType) { 33 if (WebConstants.MIME_SVG.equalsIgnoreCase(mimeType)) { 34 return ".svg"; 35 } else if (WebConstants.MIME_PNG.equalsIgnoreCase(mimeType)) { 36 return ".png"; 37 } 38 if (WebConstants.MIME_JPEG.equalsIgnoreCase(mimeType)) { 39 return ".jpg"; 40 } 41 return null; 42 } 43 44 45 } 46 | Popular Tags |