class BloombergDataUtils {

  public static Set<ExternalId> identifierLoader(final Reader reader) {
    ArgumentChecker.notNull(reader, "reader");
    final Set<ExternalId> result = Sets.newHashSet();
    final BufferedReader inputReader = new BufferedReader(reader);
    try {
      String line;
      while ((line = inputReader.readLine()) != null) {
        if (StringUtils.isBlank(line) || line.charAt(0) == '#') {
          continue;
        }
        result.add(ExternalId.parse(line));
      }
    } catch (final IOException ex) {
      throw new OpenGammaRuntimeException("cannot read from reader", ex);
    } finally {
      try {
        inputReader.close();
      } catch (final IOException ex) {
        s_logger.warn("cannot close reader ", ex);
      }
    }
    return result;
  }

  private  BloombergDataUtils();

}