code: public static String getMimeTypeByPath(String suffix) {
  		while(suffix.startsWith(".") && suffix.length() > 0) {
  			suffix = suffix.substring(1);
  		}
  		String mimeType = null;
  		while((mimeType = findInMap(suffix)) == null) {
  			int pos = suffix.indexOf('.');
  			if(pos == -1) {
  				break;
  			}
  			suffix = suffix.substring(pos+1);
  		}
  		return mimeType;
  	}
docs: TODO path split by slash + match filenames such as a.b.c.tar.gz