public static List<String> getPailRecords(Pail pail) throws IOException {
   List<String> ret = new ArrayList<String>();
   for (String s : pail.getUserFileNames()) {
     RecordInputStream is = pail.openRead(s);
     while (true) {
       byte[] r = is.readRawRecord();
       if (r == null) break;
       ret.add(new String(r));
     }
     is.close();
   }
   return ret;
 }