code: @Override
      public String toHtmlString(final Charset charset) {
          final Lock lock = sharedObject.getLock(ACCESS_OBJECT).writeLock();
          final Charset previousCharset = this.charset;
          try {
              lock.lock();
              this.charset = charset;
              // assigning it to new variable is very important here as this
              // line of code should invoke before finally block
              final String htmlString = toHtmlString();
              return htmlString;
          } finally {
              this.charset = previousCharset;
              lock.unlock();
          }
      }
docs: /*
  (non-Javadoc)
  
  @see com.webfirmframework.wffweb.tag.core.TagBase#toHtmlString(java.nio.
  charset.Charset)