private static void printList(List<?> r, Class<?> cl, boolean oneLiner) {
    boolean headerPrinted = false;
    for (Object o : r) {
      cl.cast(o);
      if (!headerPrinted) {
        if ((!(o instanceof String)) && (oneLiner)) {
          System.out.println(((StringHeader) o).getStringHeader());
        }
        headerPrinted = true;
      }
      if (oneLiner) {
        System.out.println(((XmlRpcMapped) o).toOneLinerString());
      } else {
        System.out.println(o);
      }
    }
  }