docs: public static String getCharsetFromContentType(String type) {
      	init();
          if (type == null) {
              return null;
          }
  
          int semi = type.indexOf(";");
  
          if (semi == -1) {
              return null;
          }
  
          String afterSemi = type.substring(semi + 1);
  
          int charsetLocation = afterSemi.indexOf("charset=");
  
          if (charsetLocation == -1) {
              return null;
          }
  
          return afterSemi.substring(charsetLocation + 8).trim();
      }