public static String getMIME(String str){
		//This method gets the MIME according to the extension. 
		if(str.endsWith("/")) return "text/html";
		String extension = str.substring(str.lastIndexOf(".")+1);
		switch (extension){
		case "html":
			return "text/html";
		case "htm":
			return "text/html";
		case "jpeg":
			return "image/jpeg";
		case "jpg":
			return "image/jpeg";
		case "gif":
			return "image/gif";
		case "js":
			return "application/javascript";
		case "css":
			return "text/css";
		}
		return "error";
	}