/**
  * Prints the contents of a Cursor to a String. The position is restored after printing.
  *
  * @param cursor the cursor to print
  * @return a String that contains the dumped cursor
  */
 public static String dumpCursorToString(Cursor cursor) {
   StringBuilder sb = new StringBuilder();
   dumpCursor(cursor, sb);
   return sb.toString();
 }
 /**
  * Prints the contents of a Cursor to System.out. The position is restored after printing.
  *
  * @param cursor the cursor to print
  */
 public static void dumpCursor(Cursor cursor) {
   dumpCursor(cursor, System.out);
 }