code: @Override
      public void setLocale(Locale inLocale) {
          if (isCommitted() || null == inLocale) {
              return;
          }
          this.locale = inLocale;
          if (null != this.outWriter || null != this.encoding) {
              return;
          }
          EncodingUtils encodingUtils = connection.getEncodingUtils();
          this.encoding = encodingUtils.getEncodingFromLocale(inLocale);
          if (null == this.encoding) {
              this.encoding = encodingUtils.getDefaultEncoding();
          }
          if (null != this.contentType) {
              int index = this.contentType.indexOf("charset=");
              StringBuilder sb = new StringBuilder();
              if (-1 != index) {
                  sb.append(this.contentType.substring(0, index - 1).trim());
              }
              if (this.encoding != null) {
                  sb.append(";charset=").append(this.encoding);
              }
  
              this.response.setHeader("Content-Type", sb.toString());
          }
      }
docs: /*
  @see javax.servlet.ServletResponse#setLocale(java.util.Locale)