Here you can find the source of sanitize(String mimeType)
private static String sanitize(String mimeType)
//package com.java2s; //License from project: Apache License public class Main { private static String sanitize(String mimeType) { for (String accepted : new String[] { "application/json", "text/plain" }) { if (accepted.equalsIgnoreCase(mimeType)) { return accepted; }/* w w w . ja v a 2 s .com*/ } return "text/plain"; } }