code: private String createProtocol(String name, StreamSchema schema) {
      StringBuilder stringBuilder = new StringBuilder();
      stringBuilder.append("PROTOCOL ").append(name).append(" {").append(Constants.NEWLINE);
      stringBuilder.append(StreamSchemaCodec.serialize(schema));
      stringBuilder.append("}").append(Constants.NEWLINE);
      return stringBuilder.toString();
    }
docs: Takes a name for the Schema and the StreamSchema object to create the contents for packet_schema.txt file.
  Sample file content :
  PROTOCOL name {
  ullong timestamp get_gdat_ullong_pos1 (increasing);
  uint istream get_gdat_uint_pos2;
  }