code: private void initialize(InputStream input) {
  		BufferedReader reader = null;
  
  		try {
  			reader = new BufferedReader(new InputStreamReader(input));
  
  			String line;
  
  			Matcher m;
  
  			while ((line = reader.readLine()) != null) {
  				m = TYPE_PATTERN.matcher(line);
  
  				if (m.find()) {
  					String type = m.group(1);
  					String[] extensions = m.group(2).split(" ");
  
  					for (String extension : extensions) {
  						contentTypes.put(extension, type);
  					}
  				}
  			}
  		} catch (IOException e) {
  			// Unable to load
  		} finally {
  			if (reader != null) {
  				try {
  					reader.close();
  				} catch (IOException e) {
  					e.printStackTrace();
  				}
  			}
  		}
  	}
docs: Read and parse the type file.
  
  @param input The input stream to read the file from.