Here you can find the source of loadMimeTypes(InputStream inputStream)
public static void loadMimeTypes(InputStream inputStream) throws IOException
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Robert "Unlogic" Olofsson (unlogic@unlogic.se). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v3 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl-3.0-standalone.html ******************************************************************************/ import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class Main { private static Properties MimeTypes = new Properties(); public static void loadMimeTypes(InputStream inputStream) throws IOException { MimeTypes.clear();// w w w.j ava 2 s . c om MimeTypes.load(inputStream); } }