code: public static List<String> readCommentedTextFile(final String file) throws IOException {
          BufferedReader reader = getBufferedReaderForUtf8(file);
          try {
              final List<String> lines = new ArrayList<String>();
              for (String line = reader.readLine(); line != null; line = reader.readLine()) {
                  final String trimmed = line.trim();
                  if (trimmed.length() == 0) {
                      continue;
                  }
                  final int hashIndex = trimmed.indexOf('#');
                  if (hashIndex == -1) {
                      lines.add(trimmed);
                  } else {
                      final String realPart = trimmed.substring(0, hashIndex).trim();
                      if (realPart.length() > 0) {
                          lines.add(realPart);
                      }
                  }
              }
              return lines;
          } finally {
              try {
                  reader.close();
              } catch (final IOException e) {
                  // intentionally empty
              }
          }
      }
docs: Reads all the lines in the given file, truncating everything that happens after # (including the #)
  @param file
  @return a List of the lines in the file in the order they appear (whitespace trimmed)
  @throws IOException