This method of the Entity class saves the entity to the given output stream.
public void saveEntity(XMLOutputStream o) throws IOException;
IOException if there is a problem writing to the output stream.