public void processResults(InputStream input) throws Exception {
   StreamReader reader = new StreamReader(input);
   boolean readingResults = true;
   while (readingResults) {
     int bytesToRead = FitProtocol.readSize(reader);
     if (bytesToRead != 0) {
       String resultString = reader.read(bytesToRead);
       PageResult result = PageResult.parse(resultString);
       formatter.acceptResult(result);
     } else readingResults = false;
   }
   Counts counts = FitProtocol.readCounts(reader);
   TestSummary testSummary =
       new TestSummary(counts.right, counts.wrong, counts.ignores, counts.exceptions);
   formatter.acceptFinalCount(testSummary);
 }