package com.cafaxo.lynx.util;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;

public class ResourceLocation
{

    private final String path;

    public ResourceLocation(String path)
    {
        this.path = path;
    }

    public InputStream getInputStream()
    {
        return ResourceLocation.class.getResourceAsStream(this.path);
    }

    public String getString()
    {
        try
        {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();

            int bytesRead;
            byte[] data = new byte[16384];

            InputStream inputStream = this.getInputStream();

            while ((bytesRead = inputStream.read(data, 0, data.length)) != -1)
            {
                buffer.write(data, 0, bytesRead);
            }

            return new String(buffer.toByteArray(), Charset.forName("UTF-8"));
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }

        return "";
    }

    public String getPath()
    {
        return this.path;
    }
}

@@ -110,32 +110,89 @@
 io.InputStream;%0A
+import java.net.URI;%0Aimport java.net.URISyntaxException;%0A
 import java.nio.
@@ -471,24 +471,291 @@
 path);%0A    %7D
+%0A    %0A    public URI getURI()%0A    %7B%0A        try%0A        %7B%0A            return ResourceLocation.class.getResource(this.path).toURI();%0A        %7D%0A        catch (URISyntaxException e)%0A        %7B%0A            e.printStackTrace();%0A        %7D%0A        %0A        return null;%0A    %7D
 %0A%0A    public

add ResourceLocation to URI method