@@ -0,0 +1,1159 @@
+package fi.evident.apina.utils;%0A%0Aimport java.io.*;%0Aimport java.nio.charset.Charset;%0A%0Apublic final class ResourceUtils %7B%0A%0A    private ResourceUtils() %7B %7D%0A%0A    public static String readResourceAsString(String path, Charset charset) throws IOException %7B%0A        try (Reader reader = openResourceAsReader(path, charset)) %7B%0A            StringBuilder sb = new StringBuilder();%0A            char%5B%5D buffer = new char%5B1024%5D;%0A            int n;%0A%0A            while ((n = reader.read(buffer)) != -1)%0A                sb.append(buffer, 0, n);%0A%0A            return sb.toString();%0A        %7D%0A    %7D%0A%0A    public static Reader openResourceAsReader(String path, Charset charset) throws FileNotFoundException %7B%0A        return new InputStreamReader(openResourceAsStream(path), charset);%0A    %7D%0A%0A    public static InputStream openResourceAsStream(String path) throws FileNotFoundException %7B%0A        ClassLoader classLoader = ResourceUtils.class.getClassLoader();%0A        InputStream in = classLoader.getResourceAsStream(path);%0A        if (in != null)%0A            return in;%0A        else%0A            throw new FileNotFoundException(%22could not find classpath resource: %22 + path);%0A    %7D%0A%7D%0A

Add ResourceUtils for handling classpath resources