code: public static List<Pair<Long, Double>> readScoredItems(final File userRecommendationFile, final Long user) throws IOException {
          final Map<Long, List<Pair<Long, Double>>> mapUserRecommendations = new HashMap<Long, List<Pair<Long, Double>>>();
          BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(userRecommendationFile), "UTF-8"));
          try {
              String line = null;
              boolean foundUser = false;
              // read recommendations: user \t item \t score
              while ((line = in.readLine()) != null) {
                  String[] toks = line.split("\t");
                  String u = toks[0];
                  if (u.equals(user + "")) {
                      StrategyIO.readLine(line, mapUserRecommendations);
                      foundUser = true;
                  } else if (foundUser) {
                      // assuming a sorted file (at least, per user)
                      break;
                  }
              }
          } finally {
              in.close();
          }
          return mapUserRecommendations.get(user);
      }
docs: Method that reads the scores given to items by a recommender only for a
  given user (it ignores the rest).
  
  @param userRecommendationFile The file with the recommendation scores
  @param user The user
  @return the pairs (item, score) contained in the file for that user
  @throws IOException when the file cannot be opened
  @see StrategyIO#readLine(java.lang.String, java.util.Map)