code: @Override
      public String getCharsetFromContentType(String type) {
          if (null != type) {
              int index = type.indexOf(';');
              if (-1 != index) {
                  index = type.indexOf("charset=", (index + 1));
                  if (-1 != index) {
                      String charset = type.substring(index + 8).trim();
                      int end = charset.length() - 1;
                      if (-1 == end) {
                          // empty value following charset=
                          return null;
                      }
                      if (end > 0 && '"' == charset.charAt(0) && '"' == charset.charAt(end)) {
                          // strip off quotes if both exist
                          charset = charset.substring(1, end);
                      }
                      return charset;
                  }
              }
          }
          return null;
      }
docs: /*
  @see com.ibm.websphere.http.EncodingUtils#getCharsetFromContentType(java.lang.String)