code: protected static Node readPublishedFileToSurtTrie(BufferedReader reader) throws IOException {
          // initializing with empty Alt list prevents empty pattern from being
          // created for the first addBranch()
          Node alt = new Node(null, new ArrayList<Node>());
          String line;
          while ((line = reader.readLine()) != null) {
              // discard whitespace, empty lines, comments, exceptions
              line = line.trim();
              if (line.length() == 0 || line.startsWith("//")) continue;
              // discard utf8 notation after entry
              line = line.split("\\s+")[0];
              // TODO: maybe we don't need to create lower-cased String
              line = line.toLowerCase();
              // SURT-order domain segments
              String[] segs = line.split("\\.");
              StringBuilder sb = new StringBuilder();
              for (int i = segs.length - 1; i >= 0; i--) {
                  if (segs[i].length() == 0) continue;
                  sb.append(segs[i]).append(',');
              }
              alt.addBranch(sb.toString());
          }
          return alt;
      }
docs: Reads a file of the format promulgated by publicsuffix.org, ignoring
  comments and '!' exceptions/notations, converting domain segments to
  SURT-ordering. Leaves glob-style '*' wildcarding in place. Returns root
  node of SURT-ordered prefix tree.
  
  @param reader
  @return root of prefix tree node.
  @throws IOException