code: public static String readScript(final String resourceName) throws IOException {
          final StringBuilder buf = new StringBuilder();
          try (final InputStream inputStream = ScriptUtils.class.getResourceAsStream(resourceName)) {
              if (inputStream == null) {
                  throw new IOException("Could not find script resource: " + resourceName);
              }
              try (final BufferedReader reader = new BufferedReader(
                      new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
                  String prefix = "";
                  String line;
                  while ((line = reader.readLine()) != null) {
                      line = line.trim();
                      if (line.length() > 0) {
                          buf.append(prefix).append(line.trim());
                          prefix = "\n";
                      }
                  }
              }
          }
          return buf.toString();
      }
docs: Read a script into a single-line string suitable for use in a Redis <code>EVAL</code> statement.
  @param resourceName the name of the script resource to read
  @return the string form of the script
  @throws IOException if something goes wrong