code: public void writeState(FacesContext context,
                             SerializedView state) throws IOException {
  
          if (state != null) {
              writeState(context, new Object[]{state.getStructure(),
                                               state.getState()});
          }
          
      }
docs: <p>Take the argument <code>state</code> and write it into
  the output using the current {@link ResponseWriter}, which
  must be correctly positioned already.</p>
  
  <p>If the {@link
  javax.faces.application.StateManager.SerializedView} is to be
  written out to hidden fields, the implementation must take care
  to make all necessary character replacements to make the Strings
  suitable for inclusion as an HTTP request paramater.</p>
  
  <p>If the state saving method for this application is {@link
  javax.faces.application.StateManager#STATE_SAVING_METHOD_CLIENT},
  the implementation may encrypt the state to be saved to the
  client.  We recommend that the state be unreadable by the client,
  and also be tamper evident.  The reference implementation follows
  these recommendations.  </p>
  
  @deprecated This method has been replaced by {@link
  #writeState(javax.faces.context.FacesContext,java.lang.Object)}.
  The default implementation creates a two element
  <code>Object</code> array with the first element being the return
  from calling {@link SerializedView#getStructure}, and the second
  being the return from {@link SerializedView#getState}.  It then
  passes this <code>Object</code> array to {@link #writeState}.
  
  @param context The {@link FacesContext} instance for the current request
  @param state The serialized state information previously saved