code: private final void reset(Writer out) throws IllegalArgumentException {
  
          // Check preconditions
          if (out == null) {
              throw new IllegalArgumentException("out == null");
          }
  
          // Reset the fields
          _out = out;
          _state = XMLEventListenerStates.BEFORE_XML_DECLARATION;
          _elementStackSize = 0;
          _lineBreak = LineBreak.NONE;
          _lineBreakChars = _lineBreak._lineBreakChars;
          _indentation = DEFAULT_INDENTATION;
  
          // State has changed, check
          checkInvariants();
      }
docs: Resets this <code>XMLOutputter</code> and configures it for the
  specified output stream. This sets the state to {@link #BEFORE_XML_DECLARATION} and clears
  the stack of open elements.
  
  @param out the new output stream, cannot be <code>null</code>.
  @throws IllegalArgumentException if <code>out == null</code>.