code: public synchronized void setEncoding(String encoding)
                          throws SecurityException, java.io.UnsupportedEncodingException {
          checkPermission();
          if (encoding != null) {
              try {
                  if(!java.nio.charset.Charset.isSupported(encoding)) {
                      throw new UnsupportedEncodingException(encoding);
                  }
              } catch (java.nio.charset.IllegalCharsetNameException e) {
                  throw new UnsupportedEncodingException(encoding);
              }
          }
          this.encoding = encoding;
      }
docs: Set the character encoding used by this <tt>Handler</tt>.
  <p>
  The encoding should be set before any <tt>LogRecords</tt> are written
  to the <tt>Handler</tt>.
  
  @param encoding  The name of a supported character encoding.
  May be null, to indicate the default platform encoding.
  @exception  SecurityException  if a security manager exists and if
  the caller does not have <tt>LoggingPermission("control")</tt>.
  @exception  UnsupportedEncodingException if the named encoding is
  not supported.