code: public static Path[] replaceScheme(Path[] paths, String replace, String replacement) {
      if (replace != null && replace.equals(replacement)) {
        return paths;
      }
      Path[] output = new Path[paths.length];
      for (int i = 0; i < paths.length; i++) {
        output[i] = replaceScheme(paths[i], replace, replacement);
      }
      return output;
    }
docs: Replace the scheme of each {@link Path} if it matches the string to replace.