@Test public void testGetMime() { MappingMimeTypeService s = new MappingMimeTypeService(); assertEquals("text/plain", s.getMime("f.txt")); assertEquals("text/plain", s.getMime("f.TXT")); assertEquals("video/x-f4v", s.getMime("f.f4v")); assertEquals("application/javascript", s.getMime("f.js")); assertEquals("video/mp2t", s.getMime("f.ts")); assertEquals("application/x-mpegurl", s.getMime("f.m3u8")); assertEquals("application/octet-stream", s.getMime("._f.txt")); }
@Override public String getMime(final String filename) { if(StringUtils.startsWith(filename, "._")) { return DEFAULT_CONTENT_TYPE; } return types.getMimetype(StringUtils.lowerCase(filename)); }
MappingMimeTypeService implements MimeTypeService { @Override public String getMime(final String filename) { if(StringUtils.startsWith(filename, "._")) { return DEFAULT_CONTENT_TYPE; } return types.getMimetype(StringUtils.lowerCase(filename)); } }
MappingMimeTypeService implements MimeTypeService { @Override public String getMime(final String filename) { if(StringUtils.startsWith(filename, "._")) { return DEFAULT_CONTENT_TYPE; } return types.getMimetype(StringUtils.lowerCase(filename)); }  }
MappingMimeTypeService implements MimeTypeService { @Override public String getMime(final String filename) { if(StringUtils.startsWith(filename, "._")) { return DEFAULT_CONTENT_TYPE; } return types.getMimetype(StringUtils.lowerCase(filename)); }  @Override String getMime(final String filename); }
MappingMimeTypeService implements MimeTypeService { @Override public String getMime(final String filename) { if(StringUtils.startsWith(filename, "._")) { return DEFAULT_CONTENT_TYPE; } return types.getMimetype(StringUtils.lowerCase(filename)); }  @Override String getMime(final String filename);  }