code: @VisibleForTesting
     String getStreamParseTree() {
      StringBuilder stringBuilder = new StringBuilder();
      stringBuilder.append("FTA {").append(Constants.NEWLINE).append("STREAM ").append(name).append(" {")
        .append(Constants.NEWLINE);
      stringBuilder.append(StreamSchemaCodec.serialize(schema));
      stringBuilder.append("}").append(Constants.NEWLINE)
        .append("DEFINE {").append(Constants.NEWLINE)
        .append(String.format("query_name '%s';", name)).append(Constants.NEWLINE)
        .append(String.format("_referenced_ifaces '[%s]';", "default")).append(Constants.NEWLINE)
        .append("visibility 'external';").append(Constants.NEWLINE).append("}").append(Constants.NEWLINE)
        .append("PARAM {").append(Constants.NEWLINE).append("}").append(Constants.NEWLINE)
        .append("SELECT foo FROM bar").append(Constants.NEWLINE).append("}").append(Constants.NEWLINE).append('\0');
      return stringBuilder.toString();
    }
docs: Takes a name for the Schema and the StreamSchema object to create the contents for StreamTree.
  Sample header :
  FTA {
  STREAM inputStream {
  ullong timestamp get_gdat_ullong_pos1 (increasing);
  uint istream get_gdata_uint_pos2;
  }
  DEFINE {
  query_name 'example';
  _referenced_ifaces '[default]';
  visibility 'external';
  }
  PARAM { }
  SELECT foo FROM bar
  }