1 package org.apache.turbine.services.mimetype; 2 3 18 19 import java.io.File ; 20 import java.util.Locale ; 21 22 import org.apache.turbine.services.Service; 23 import org.apache.turbine.services.mimetype.util.MimeType; 24 25 35 public interface MimeTypeService extends Service 36 { 37 40 String SERVICE_NAME = "MimeTypeService"; 41 42 49 void setContentType(String spec); 50 51 57 String getContentType(File file); 58 59 65 String getContentType(String name); 66 67 74 String getContentType(String ext, 75 String def); 76 77 83 MimeType getMimeContentType(File file); 84 85 91 MimeType getMimeContentType(String name); 92 93 100 MimeType getMimeContentType(String ext, 101 String def); 102 103 110 String getDefaultExtension(String type); 111 112 119 String getDefaultExtension(MimeType mime); 120 121 127 void setCharSet(String key, 128 String charset); 129 130 138 String getCharSet(Locale locale); 139 140 156 String getCharSet(Locale locale, 157 String variant); 158 159 165 String getCharSet(String key); 166 167 174 String getCharSet(String key, 175 String def); 176 } 177 | Popular Tags |