code: public final void reset(Writer out, String encoding) throws IllegalArgumentException, UnsupportedEncodingException {
  
          // Check arguments
          if (encoding == null) {
              throw new IllegalArgumentException("encoding == null");
          }
  
          reset(out);
  
          // Store the fields
          _encoder = XMLEncoder.getEncoder(encoding);
  
          // State has changed, check
          checkInvariants();
      }
docs: Resets this <code>XMLOutputter</code> and configures it for the
  specified output stream and encoding. This resets the state to
  {@link #BEFORE_XML_DECLARATION} and clears the stack of open elements.
  
  @param out      the output stream to write to, not <code>null</code>.
  @param encoding the encoding, not <code>null</code>.
  @throws IllegalArgumentException     if <code>out == null || encoding == null</code>.
  @throws UnsupportedEncodingException if the specified encoding is not supported.